Log socket timeout values

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1701258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2015-09-04 13:47:05 +00:00
parent 6fd73b5fb5
commit 8cf6df2c8b
1 changed files with 14 additions and 3 deletions

View File

@ -75,10 +75,21 @@ class LoggingManagedHttpClientConnection extends DefaultManagedHttpClientConnect
@Override
public void close() throws IOException {
if (this.log.isDebugEnabled()) {
this.log.debug(getId() + ": Close connection");
if (super.isOpen()) {
if (this.log.isDebugEnabled()) {
this.log.debug(getId() + ": Close connection");
}
super.close();
}
super.close();
}
@Override
public void setSocketTimeout(final int timeout) {
if (this.log.isDebugEnabled()) {
this.log.debug(getId() + ": set socket timeout to " + timeout);
}
super.setSocketTimeout(timeout);
}
@Override