Fix connection-pool-size 0 being ignored and being unable to disable the connection pool
This commit is contained in:
parent
ccbddb2258
commit
8c7a08e580
2 changed files with 4 additions and 8 deletions
|
@ -427,13 +427,11 @@ public class HttpClientBuilder {
|
||||||
throw new RuntimeException("Failed to load keystore", e);
|
throw new RuntimeException("Failed to load keystore", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int size = 10;
|
|
||||||
if (adapterConfig.getConnectionPoolSize() > 0)
|
|
||||||
size = adapterConfig.getConnectionPoolSize();
|
|
||||||
HttpClientBuilder.HostnameVerificationPolicy policy = HttpClientBuilder.HostnameVerificationPolicy.WILDCARD;
|
HttpClientBuilder.HostnameVerificationPolicy policy = HttpClientBuilder.HostnameVerificationPolicy.WILDCARD;
|
||||||
if (adapterConfig.isAllowAnyHostname())
|
if (adapterConfig.isAllowAnyHostname())
|
||||||
policy = HttpClientBuilder.HostnameVerificationPolicy.ANY;
|
policy = HttpClientBuilder.HostnameVerificationPolicy.ANY;
|
||||||
connectionPoolSize(size);
|
connectionPoolSize(adapterConfig.getConnectionPoolSize());
|
||||||
hostnameVerification(policy);
|
hostnameVerification(policy);
|
||||||
if (adapterConfig.isDisableTrustManager()) {
|
if (adapterConfig.isDisableTrustManager()) {
|
||||||
disableTrustManager();
|
disableTrustManager();
|
||||||
|
|
|
@ -359,13 +359,11 @@ public class HttpClientBuilder {
|
||||||
throw new RuntimeException("Failed to load keystore", e);
|
throw new RuntimeException("Failed to load keystore", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int size = 10;
|
|
||||||
if (adapterConfig.getConnectionPoolSize() > 0)
|
|
||||||
size = adapterConfig.getConnectionPoolSize();
|
|
||||||
HttpClientBuilder.HostnameVerificationPolicy policy = HttpClientBuilder.HostnameVerificationPolicy.WILDCARD;
|
HttpClientBuilder.HostnameVerificationPolicy policy = HttpClientBuilder.HostnameVerificationPolicy.WILDCARD;
|
||||||
if (adapterConfig.isAllowAnyHostname())
|
if (adapterConfig.isAllowAnyHostname())
|
||||||
policy = HttpClientBuilder.HostnameVerificationPolicy.ANY;
|
policy = HttpClientBuilder.HostnameVerificationPolicy.ANY;
|
||||||
connectionPoolSize(size);
|
connectionPoolSize(adapterConfig.getConnectionPoolSize());
|
||||||
hostnameVerification(policy);
|
hostnameVerification(policy);
|
||||||
if (adapterConfig.isDisableTrustManager()) {
|
if (adapterConfig.isDisableTrustManager()) {
|
||||||
disableTrustManager();
|
disableTrustManager();
|
||||||
|
|
Loading…
Reference in a new issue