From 25ff7db458f44a7cd29c49bd8aa6f576ac674c7c Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sat, 28 Feb 2009 12:04:44 +0000 Subject: [PATCH] Slightly more intelligible debug log git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@748827 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/http/impl/client/DefaultRequestDirector.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java b/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java index e81ca3ff5..d5b666164 100644 --- a/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java +++ b/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java @@ -456,7 +456,11 @@ public class DefaultRequestDirector implements RequestDirector { managedConn.setIdleDuration(duration, TimeUnit.MILLISECONDS); if (this.log.isDebugEnabled()) { - this.log.debug("Connection can be kept alive for " + duration + " ms"); + if (duration >= 0) { + this.log.debug("Connection can be kept alive for " + duration + " ms"); + } else { + this.log.debug("Connection can be kept alive indefinitely"); + } } }