@Override
public Socket createSocket(final String host, final int port, final InetAddress localAddress, final int localPort, final HttpConnectionParams params) throws IOException,
UnknownHostException, ConnectTimeoutException {
int timeout = params.getConnectionTimeout();
if (timeout == 0) {
<BUG>return createSocket(host, port, localAddress, localPort);

} else {
SSLSocket s = (SSLSocket) ssf.createSocket();
s.setEnabledProtocols(SSLUtils.getSupportedProtocols(s.getEnabledProtocols()));

s.bind(new InetSocketAddress(localAddress, localPort));</BUG>
s.connect(new InetSocketAddress(host, port), timeout);

@Override
public Socket createSocket(final String host, final int port) throws IOException {
Socket s = ssf.createSocket(host, port);
if (s instanceof SSLSocket) {
((SSLSocket)s).setEnabledProtocols(SSLUtils.getSupportedProtocols(((SSLSocket)s).getEnabledProtocols()));
}
