SSLSocketFactory to use javax.net.ssl.SSLSocketFactory#createSocket() instead of new Socket()
Contributed by Mark Claassen <mac01at donnell.com> git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1311409 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0fb328d01c
commit
db9f011a83
|
@ -518,7 +518,7 @@ public class SSLSocketFactory implements SchemeLayeredSocketFactory,
|
|||
if (params == null) {
|
||||
throw new IllegalArgumentException("HTTP parameters may not be null");
|
||||
}
|
||||
Socket sock = socket != null ? socket : new Socket();
|
||||
Socket sock = socket != null ? socket : this.socketfactory.createSocket();
|
||||
if (localAddress != null) {
|
||||
sock.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params));
|
||||
sock.bind(localAddress);
|
||||
|
|
Loading…
Reference in New Issue