Feature | Accept connected sockets from custom socket factory
Accept connected sockets from custom socket factory
@@ -2681,7 +2681,9 @@ final class SocketFinder {
if (addr.isUnresolved())
throw new java.net.UnknownHostException();
selectedSocket = getSocketFactory().createSocket();
+ if (!selectedSocket.isConnected()) {
selectedSocket.connect(addr, timeoutInMilliSeconds);
+ }
return selectedSocket;
}
