HTTPCLIENT-1478: deprecated SSLSocketFactory ignores socket timeout parameter during SSL handshake

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1576362 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2014-03-11 14:16:43 +00:00
parent 3220bbf633
commit 09027e7286
1 changed files with 2 additions and 0 deletions

View File

@ -397,7 +397,9 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
} else { } else {
host = new HttpHost(remoteAddress.getHostName(), remoteAddress.getPort(), "https"); host = new HttpHost(remoteAddress.getHostName(), remoteAddress.getPort(), "https");
} }
final int socketTimeout = HttpConnectionParams.getSoTimeout(params);
final int connectTimeout = HttpConnectionParams.getConnectionTimeout(params); final int connectTimeout = HttpConnectionParams.getConnectionTimeout(params);
socket.setSoTimeout(socketTimeout);
return connectSocket(connectTimeout, socket, host, remoteAddress, localAddress, null); return connectSocket(connectTimeout, socket, host, remoteAddress, localAddress, null);
} }