HTTPCLIENT-1835: evictExpiredConnections no longer causes the evictIdleConnections behaviour to be enabled when evictIdleConnections is not explicitly enabled

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1788069 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2017-03-22 09:03:54 +00:00
parent f8eb3bf235
commit 0aff0348ad
2 changed files with 4 additions and 2 deletions

View File

@ -507,7 +507,8 @@ public class HttpAsyncClientBuilder {
if (evictExpiredConnections || evictIdleConnections) { if (evictExpiredConnections || evictIdleConnections) {
if (connManagerCopy instanceof ConnPoolControl) { if (connManagerCopy instanceof ConnPoolControl) {
final IdleConnectionEvictor connectionEvictor = new IdleConnectionEvictor((ConnPoolControl<?>) connManagerCopy, final IdleConnectionEvictor connectionEvictor = new IdleConnectionEvictor((ConnPoolControl<?>) connManagerCopy,
maxIdleTime > 0 ? maxIdleTime : 10, maxIdleTimeUnit != null ? maxIdleTimeUnit : TimeUnit.SECONDS); maxIdleTime > 0 ? maxIdleTime : 10, maxIdleTimeUnit != null ? maxIdleTimeUnit : TimeUnit.SECONDS,
maxIdleTime, maxIdleTimeUnit);
closeablesCopy.add(new Closeable() { closeablesCopy.add(new Closeable() {
@Override @Override

View File

@ -867,7 +867,8 @@ public class HttpClientBuilder {
if (evictExpiredConnections || evictIdleConnections) { if (evictExpiredConnections || evictIdleConnections) {
if (connManagerCopy instanceof ConnPoolControl) { if (connManagerCopy instanceof ConnPoolControl) {
final IdleConnectionEvictor connectionEvictor = new IdleConnectionEvictor((ConnPoolControl<?>) connManagerCopy, final IdleConnectionEvictor connectionEvictor = new IdleConnectionEvictor((ConnPoolControl<?>) connManagerCopy,
maxIdleTime > 0 ? maxIdleTime : 10, maxIdleTimeUnit != null ? maxIdleTimeUnit : TimeUnit.SECONDS); maxIdleTime > 0 ? maxIdleTime : 10, maxIdleTimeUnit != null ? maxIdleTimeUnit : TimeUnit.SECONDS,
maxIdleTime, maxIdleTimeUnit);
closeablesCopy.add(new Closeable() { closeablesCopy.add(new Closeable() {
@Override @Override