Log 'Connection can be kept alive' debug message only if the connection is known be re-usable
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1442567 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3627984c9d
commit
4a021ce33a
|
@ -209,6 +209,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
|
|||
if (managedConn.isOpen() && !managedConn.isMarkedReusable()) {
|
||||
shutdownConnection(managedConn);
|
||||
}
|
||||
if (managedConn.isMarkedReusable()) {
|
||||
this.poolEntry.updateExpiry(keepalive, tunit != null ? tunit : TimeUnit.MILLISECONDS);
|
||||
if (this.log.isDebugEnabled()) {
|
||||
String s;
|
||||
|
@ -219,6 +220,7 @@ public class BasicClientConnectionManager implements ClientConnectionManager {
|
|||
}
|
||||
this.log.debug("Connection can be kept alive " + s);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
managedConn.detach();
|
||||
this.conn = null;
|
||||
|
|
Loading…
Reference in New Issue