From 72c7034298e30edae70290632a75c6555e68f833 Mon Sep 17 00:00:00 2001 From: Albert Peschar Date: Sun, 28 Feb 2021 12:59:51 +0000 Subject: [PATCH] Increase HTTP client timeouts (#1336) --- lego/client_config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lego/client_config.go b/lego/client_config.go index c07d20a7..90ad8081 100644 --- a/lego/client_config.go +++ b/lego/client_config.go @@ -64,15 +64,15 @@ type CertificateConfig struct { // based on the caCertificatesEnvVar environment variable (see the `initCertPool` function). func createDefaultHTTPClient() *http.Client { return &http.Client{ + Timeout: 2 * time.Minute, Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }).DialContext, - TLSHandshakeTimeout: 15 * time.Second, - ResponseHeaderTimeout: 15 * time.Second, - ExpectContinueTimeout: 1 * time.Second, + TLSHandshakeTimeout: 30 * time.Second, + ResponseHeaderTimeout: 30 * time.Second, TLSClientConfig: &tls.Config{ ServerName: os.Getenv(caServerNameEnvVar), RootCAs: initCertPool(),