From 2635028db0f037f21192e14960932d876ed1482c Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Wed, 22 Mar 2017 08:36:35 +0000 Subject: [PATCH] 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/branches/4.5.x@1788066 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/http/impl/client/HttpClientBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java b/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java index 6baa387fd..4806e387f 100644 --- a/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java +++ b/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java @@ -1207,7 +1207,8 @@ public class HttpClientBuilder { if (evictExpiredConnections || evictIdleConnections) { final IdleConnectionEvictor connectionEvictor = new IdleConnectionEvictor(cm, - maxIdleTime > 0 ? maxIdleTime : 10, maxIdleTimeUnit != null ? maxIdleTimeUnit : TimeUnit.SECONDS); + maxIdleTime > 0 ? maxIdleTime : 10, maxIdleTimeUnit != null ? maxIdleTimeUnit : TimeUnit.SECONDS, + maxIdleTime, maxIdleTimeUnit); closeablesCopy.add(new Closeable() { @Override