hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1787981 - /httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
Date Tue, 21 Mar 2017 14:47:26 GMT
Author: olegk
Date: Tue Mar 21 14:47:26 2017
New Revision: 1787981

URL: http://svn.apache.org/viewvc?rev=1787981&view=rev
Log:
HTTPCLIENT-1830: await termination of the IdleConnectionEvictor when it is shut down
Contributed by Liam Williams <liam.williams at zoho.com>

Modified:
    httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java

Modified: httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java?rev=1787981&r1=1787980&r2=1787981&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
(original)
+++ httpcomponents/httpclient/branches/4.6.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
Tue Mar 21 14:47:26 2017
@@ -1215,6 +1215,11 @@ public class HttpClientBuilder {
                     @Override
                     public void close() throws IOException {
                         connectionEvictor.shutdown();
+                        try {
+                            connectionEvictor.awaitTermination(1L, TimeUnit.SECONDS);
+                        } catch (InterruptedException interrupted) {
+                            Thread.currentThread().interrupt();
+                        }
                     }
 
                 });



Mime
View raw message