hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1626782 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
Date Mon, 22 Sep 2014 14:10:18 GMT
Author: olegk
Date: Mon Sep 22 14:10:17 2014
New Revision: 1626782

URL: http://svn.apache.org/r1626782
Log:
Use non-zero connect timeout as SSL handshake handshake (socket) timeout if not explicitly
set by the caller (socket timeout is zero)

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java?rev=1626782&r1=1626781&r2=1626782&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
Mon Sep 22 14:10:17 2014
@@ -320,6 +320,9 @@ public class SSLConnectionSocketFactory 
             sock.bind(localAddress);
         }
         try {
+            if (connectTimeout > 0 && sock.getSoTimeout() == 0) {
+                sock.setSoTimeout(connectTimeout);
+            }
             sock.connect(remoteAddress, connectTimeout);
         } catch (final IOException ex) {
             try {



Mime
View raw message