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:
parent
1a26a94f95
commit
955f47e6f5
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue