summaryrefslogtreecommitdiff
path: root/source/de/anomic/http/httpClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'source/de/anomic/http/httpClient.java')
-rw-r--r--source/de/anomic/http/httpClient.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/de/anomic/http/httpClient.java b/source/de/anomic/http/httpClient.java
index a869c393f..f787fe660 100644
--- a/source/de/anomic/http/httpClient.java
+++ b/source/de/anomic/http/httpClient.java
@@ -90,6 +90,7 @@ public class httpClient {
/**
* set options for client
*/
+ MultiThreadedHttpConnectionManager.shutdownAll();
initConnectionManager();
// accept self-signed or untrusted certificates
@@ -112,7 +113,11 @@ public class httpClient {
}
public static void initConnectionManager() {
- MultiThreadedHttpConnectionManager.shutdownAll();
+ if (conManager != null) {
+ conManager.closeIdleConnections(0);
+ conManager.deleteClosedConnections();
+ conManager.shutdown();
+ }
conManager = new MultiThreadedHttpConnectionManager();
apacheHttpClient = new HttpClient(conManager);