hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1701259 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
Date Fri, 04 Sep 2015 13:49:19 GMT
Author: olegk
Date: Fri Sep  4 13:49:19 2015
New Revision: 1701259

URL: http://svn.apache.org/r1701259
Log:
Log socket timeout values

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java?rev=1701259&r1=1701258&r2=1701259&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/LoggingManagedHttpClientConnection.java
Fri Sep  4 13:49:19 2015
@@ -75,10 +75,21 @@ class LoggingManagedHttpClientConnection
 
     @Override
     public void close() throws IOException {
+
+        if (super.isOpen()) {
+            if (this.log.isDebugEnabled()) {
+                this.log.debug(getId() + ": Close connection");
+            }
+            super.close();
+        }
+    }
+
+    @Override
+    public void setSocketTimeout(final int timeout) {
         if (this.log.isDebugEnabled()) {
-            this.log.debug(getId() + ": Close connection");
+            this.log.debug(getId() + ": set socket timeout to " + timeout);
         }
-        super.close();
+        super.setSocketTimeout(timeout);
     }
 
     @Override



Mime
View raw message