mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Disable stale checking for local Docker daemon connections
Fixes gh-40697
This commit is contained in:
parent
45e4f137de
commit
2bb74b261c
@ -26,6 +26,7 @@ import com.sun.jna.Platform;
|
|||||||
import org.apache.hc.client5.http.DnsResolver;
|
import org.apache.hc.client5.http.DnsResolver;
|
||||||
import org.apache.hc.client5.http.HttpRoute;
|
import org.apache.hc.client5.http.HttpRoute;
|
||||||
import org.apache.hc.client5.http.classic.HttpClient;
|
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.HttpClientBuilder;
|
||||||
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
import org.apache.hc.client5.http.impl.io.BasicHttpClientConnectionManager;
|
import org.apache.hc.client5.http.impl.io.BasicHttpClientConnectionManager;
|
||||||
@ -73,8 +74,13 @@ final class LocalHttpClientTransport extends HttpClientTransport {
|
|||||||
*/
|
*/
|
||||||
private static class LocalConnectionManager extends BasicHttpClientConnectionManager {
|
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) {
|
LocalConnectionManager(String host) {
|
||||||
super(getRegistry(host), null, null, new LocalDnsResolver());
|
super(getRegistry(host), null, null, new LocalDnsResolver());
|
||||||
|
setConnectionConfig(CONNECTION_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Registry<ConnectionSocketFactory> getRegistry(String host) {
|
private static Registry<ConnectionSocketFactory> getRegistry(String host) {
|
||||||
|
Loading…
Reference in New Issue
Block a user