final Socket createSocket(ServerDesc server) throws IOException {
if (server == null)
throw new ConnectException("Cannot connect to null server");
for (Enumeration e = server.getSockAddrs(); e.hasMoreElements();) {
SocketAddress sa = (SocketAddress) e.nextElement();
if (this.logmon.isLoggable(BasicLevel.DEBUG))
this.logmon.log(BasicLevel.DEBUG,
this.getName() + ", try to connect server#" +
server.getServerId() +
", addr=" + sa.getHostname() +
", port=" + sa.getPort());
try {
Socket socket = createSocket(sa);
if (this.logmon.isLoggable(BasicLevel.DEBUG))