mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-16 15:07:27 +00:00
HTTPCLIENT-2315: client builders fails to apply system properties to the default connection manager
This commit is contained in:
parent
8228ddf28a
commit
ef77109f35
@ -779,7 +779,11 @@ protected void addCloseable(final Closeable closeable) {
|
||||
public CloseableHttpAsyncClient build() {
|
||||
AsyncClientConnectionManager connManagerCopy = this.connManager;
|
||||
if (connManagerCopy == null) {
|
||||
connManagerCopy = PoolingAsyncClientConnectionManagerBuilder.create().build();
|
||||
final PoolingAsyncClientConnectionManagerBuilder connectionManagerBuilder = PoolingAsyncClientConnectionManagerBuilder.create();
|
||||
if (systemProperties) {
|
||||
connectionManagerBuilder.useSystemProperties();
|
||||
}
|
||||
connManagerCopy = connectionManagerBuilder.build();
|
||||
}
|
||||
|
||||
ConnectionKeepAliveStrategy keepAliveStrategyCopy = this.keepAliveStrategy;
|
||||
|
@ -751,7 +751,11 @@ public CloseableHttpClient build() {
|
||||
}
|
||||
HttpClientConnectionManager connManagerCopy = this.connManager;
|
||||
if (connManagerCopy == null) {
|
||||
connManagerCopy = PoolingHttpClientConnectionManagerBuilder.create().build();
|
||||
final PoolingHttpClientConnectionManagerBuilder connectionManagerBuilder = PoolingHttpClientConnectionManagerBuilder.create();
|
||||
if (systemProperties) {
|
||||
connectionManagerBuilder.useSystemProperties();
|
||||
}
|
||||
connManagerCopy = connectionManagerBuilder.build();
|
||||
}
|
||||
ConnectionReuseStrategy reuseStrategyCopy = this.reuseStrategy;
|
||||
if (reuseStrategyCopy == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user