hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1788069 - in /httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl: async/HttpAsyncClientBuilder.java sync/HttpClientBuilder.java
Date Wed, 22 Mar 2017 09:03:54 GMT
Author: olegk
Date: Wed Mar 22 09:03:54 2017
New Revision: 1788069

URL: http://svn.apache.org/viewvc?rev=1788069&view=rev
Log:
HTTPCLIENT-1835: evictExpiredConnections no longer causes the evictIdleConnections behaviour
to be enabled when evictIdleConnections is not explicitly enabled

Modified:
    httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
    httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java

Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java?rev=1788069&r1=1788068&r2=1788069&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
Wed Mar 22 09:03:54 2017
@@ -507,7 +507,8 @@ public class HttpAsyncClientBuilder {
             if (evictExpiredConnections || evictIdleConnections) {
                 if (connManagerCopy instanceof ConnPoolControl) {
                     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() {
 
                         @Override

Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java?rev=1788069&r1=1788068&r2=1788069&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java
Wed Mar 22 09:03:54 2017
@@ -867,7 +867,8 @@ public class HttpClientBuilder {
             if (evictExpiredConnections || evictIdleConnections) {
                 if (connManagerCopy instanceof ConnPoolControl) {
                     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() {
 
                         @Override



Mime
View raw message