Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26219113BD for ; Mon, 15 Sep 2014 08:24:31 +0000 (UTC) Received: (qmail 89466 invoked by uid 500); 15 Sep 2014 08:24:31 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 89425 invoked by uid 500); 15 Sep 2014 08:24:31 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 89416 invoked by uid 99); 15 Sep 2014 08:24:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Sep 2014 08:24:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Sep 2014 08:24:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F0BE623888D2 for ; Mon, 15 Sep 2014 08:24:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140915082409.F0BE623888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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"; }