forked from TrueCloudLab/distribution
Merge pull request #13308 from lightsofapollo/issue-13307
Increase default connection timeout to 30s
This commit is contained in:
commit
f13f3a774f
1 changed files with 3 additions and 2 deletions
|
@ -52,8 +52,9 @@ func newClient(jar http.CookieJar, roots *x509.CertPool, certs []tls.Certificate
|
||||||
switch timeout {
|
switch timeout {
|
||||||
case ConnectTimeout:
|
case ConnectTimeout:
|
||||||
httpTransport.Dial = func(proto string, addr string) (net.Conn, error) {
|
httpTransport.Dial = func(proto string, addr string) (net.Conn, error) {
|
||||||
// Set the connect timeout to 5 seconds
|
// Set the connect timeout to 30 seconds to allow for slower connection
|
||||||
d := net.Dialer{Timeout: 5 * time.Second, DualStack: true}
|
// times...
|
||||||
|
d := net.Dialer{Timeout: 30 * time.Second, DualStack: true}
|
||||||
|
|
||||||
conn, err := d.Dial(proto, addr)
|
conn, err := d.Dial(proto, addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue