From 1a1183c8c2d1b1869831fde31571f91993a20e59 Mon Sep 17 00:00:00 2001 From: Stu Arnett <4664091+twincitiesguy@users.noreply.github.com> Date: Sat, 17 Jul 2021 12:20:42 -0500 Subject: [PATCH] PoolingClientConnectionManager is deprecated in the referenced version of httpclient, but apparently its replacement (PoolingHttpClientConnectionManager) has different behavior that breaks our usage, so we have to continue using the deprecated class for now (#17) --- src/main/java/com/emc/rest/smart/SmartClientFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/emc/rest/smart/SmartClientFactory.java b/src/main/java/com/emc/rest/smart/SmartClientFactory.java index 7edeb19..31d7edb 100644 --- a/src/main/java/com/emc/rest/smart/SmartClientFactory.java +++ b/src/main/java/com/emc/rest/smart/SmartClientFactory.java @@ -147,7 +147,9 @@ static ApacheHttpClient4Handler createApacheClientHandler(SmartConfig smartConfi ClientConfig clientConfig = new DefaultClientConfig(); // set up multi-threaded connection pool - org.apache.http.impl.conn.PoolingHttpClientConnectionManager connectionManager = new org.apache.http.impl.conn.PoolingHttpClientConnectionManager(); + // TODO: find a non-deprecated connection manager that works (swapping out with + // PoolingHttpClientConnectionManager will break threading) + org.apache.http.impl.conn.PoolingClientConnectionManager connectionManager = new org.apache.http.impl.conn.PoolingClientConnectionManager(); // 999 maximum active connections (max allowed) connectionManager.setDefaultMaxPerRoute(999); connectionManager.setMaxTotal(999);