try {
socket = Socket.create();
socket.setKeepAlive(true);
socket.setNoDelay(true);
socket.setTimeout(connectTimeout);
socket.connect(host, port);
socket.setTimeout(readTimeout);
return socket;
} catch (Exception e) {
if (socket != null) socket.close();
throw new PoolException(name() + " createObject failed", e);