HTTPCLIENT-932 Fix possible NPE - use sslsock rather than sock

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@940069 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-05-01 16:16:59 +00:00
parent 1a26a94f95
commit 955f47e6f5
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ public class SSLSocketFactory implements LayeredSchemeSocketFactory, LayeredSock
} }
SSLSocket sslsock = (SSLSocket) (sock != null ? sock : createSocket()); SSLSocket sslsock = (SSLSocket) (sock != null ? sock : createSocket());
if (localAddress != null) { if (localAddress != null) {
sock.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params)); sslsock.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params));
sslsock.bind(localAddress); sslsock.bind(localAddress);
} }