From 955f47e6f592a97735ac80ff4fd265a9ba041430 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Sat, 1 May 2010 16:16:59 +0000 Subject: [PATCH] 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 --- .../main/java/org/apache/http/conn/ssl/SSLSocketFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java index 52b37f761..9c77b90ca 100644 --- a/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java +++ b/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java @@ -364,7 +364,7 @@ public class SSLSocketFactory implements LayeredSchemeSocketFactory, LayeredSock } SSLSocket sslsock = (SSLSocket) (sock != null ? sock : createSocket()); if (localAddress != null) { - sock.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params)); + sslsock.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params)); sslsock.bind(localAddress); }