HTTPCLIENT-1609: Stale connection check in PoolingHttpClientConnectionManager has no effect

Contributed by Charles Lip <rene1 at singnet.com.sg>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1658897 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2015-02-11 08:45:57 +00:00
parent 213d5b1871
commit a52b979477
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,12 @@
Changes since 4.4
-------------------
* [HTTPCLIENT-1609] Stale connection check in PoolingHttpClientConnectionManager has no effect.
Internal connection pool does not correctly implement connection validation.
Contributed by Charles Lip <rene1 at singnet.com.sg>
Release 4.4 Final
-------------------

View File

@ -64,4 +64,9 @@ class CPool extends AbstractConnPool<HttpRoute, ManagedHttpClientConnection, CPo
return new CPoolEntry(this.log, id, route, conn, this.timeToLive, this.tunit);
}
@Override
protected boolean validate(final CPoolEntry entry) {
return !entry.getConnection().isStale();
}
}