Skip to content

Commit

Permalink
Merge branch '3.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
scottfrederick committed Jun 10, 2024
2 parents f883a26 + 2bb74b2 commit 87094ed
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.hc.client5.http.DnsResolver;
import org.apache.hc.client5.http.HttpRoute;
import org.apache.hc.client5.http.classic.HttpClient;
import org.apache.hc.client5.http.config.ConnectionConfig;
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.apache.hc.client5.http.impl.io.BasicHttpClientConnectionManager;
Expand Down Expand Up @@ -73,8 +74,13 @@ static LocalHttpClientTransport create(ResolvedDockerHost dockerHost) {
*/
private static class LocalConnectionManager extends BasicHttpClientConnectionManager {

private static final ConnectionConfig CONNECTION_CONFIG = ConnectionConfig.copy(ConnectionConfig.DEFAULT)
.setValidateAfterInactivity(TimeValue.NEG_ONE_MILLISECOND)
.build();

LocalConnectionManager(String host) {
super(getRegistry(host), null, null, new LocalDnsResolver());
setConnectionConfig(CONNECTION_CONFIG);
}

private static Registry<ConnectionSocketFactory> getRegistry(String host) {
Expand Down

0 comments on commit 87094ed

Please sign in to comment.