private InetAddress currentAddress() throws UnknownHostException {
            if (addresses.isEmpty()) {
                resolveAddresses();
            }

            // Save the address that we return so that we don't try it twice in a row when we re-resolve due to
            // disconnecting or exhausting the addresses
            InetAddress currentAddress = addresses.get(addressIndex);
            lastAttemptedAddress = currentAddress;
            return currentAddress;
        }
Fetches the current selected IP address for this node, resolving {@link #host()} if necessary.
@return the selected address
@throws UnknownHostException if resolving {@link #host()} fails
clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java