hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1624964 - /httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java
Date Mon, 15 Sep 2014 08:24:09 GMT
Author: olegk
Date: Mon Sep 15 08:24:09 2014
New Revision: 1624964

URL: http://svn.apache.org/r1624964
Log:
HTTPCLIENT-1525: fixed inconsistent debug log
Contributed by Joseph Walton <joe at kafsemo.org>

Modified:
    httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java

Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java?rev=1624964&r1=1624963&r2=1624964&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java
(original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java
Mon Sep 15 08:24:09 2014
@@ -268,12 +268,13 @@ public class PoolingHttpClientConnection
             final ManagedHttpClientConnection conn = entry.getConnection();
             try {
                 if (conn.isOpen()) {
+                    final TimeUnit effectiveUnit = tunit != null ? tunit : TimeUnit.MILLISECONDS;
                     entry.setState(state);
-                    entry.updateExpiry(keepalive, tunit != null ? tunit : TimeUnit.MILLISECONDS);
+                    entry.updateExpiry(keepalive, effectiveUnit);
                     if (this.log.isDebugEnabled()) {
                         final String s;
                         if (keepalive > 0) {
-                            s = "for " + (double) keepalive / 1000 + " seconds";
+                            s = "for " + (double) effectiveUnit.toMillis(keepalive) / 1000
+ " seconds";
                         } else {
                             s = "indefinitely";
                         }



Mime
View raw message