Log socket timeout values

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1701259 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2015-09-04 13:49:19 +00:00
parent 64371f7410
commit da125f2d4d
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