Use non-zero connect timeout as SSL handshake handshake (socket) timeout if not explicitly set by the caller (socket timeout is zero)
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1626782 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
04337ec994
commit
1d09a8308f
|
@ -320,6 +320,9 @@ public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactor
|
|||
sock.bind(localAddress);
|
||||
}
|
||||
try {
|
||||
if (connectTimeout > 0 && sock.getSoTimeout() == 0) {
|
||||
sock.setSoTimeout(connectTimeout);
|
||||
}
|
||||
sock.connect(remoteAddress, connectTimeout);
|
||||
} catch (final IOException ex) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue