Skip to content

Commit 8c40c0b

Browse files
pcarranzagaryburd
authored andcommitted
Bump default handshake timetout to 45 seconds
1 parent 196b8d0 commit 8c40c0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufS
4141
NetDial: func(net, addr string) (net.Conn, error) {
4242
return netConn, nil
4343
},
44-
HandshakeTimeout: 5 * time.Second,
44+
HandshakeTimeout: 45 * time.Second,
4545
}
4646
return d.Dial(u.String(), requestHeader)
4747
}
@@ -108,7 +108,7 @@ func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) {
108108
// DefaultDialer is a dialer with all fields set to the default values.
109109
var DefaultDialer = &Dialer{
110110
Proxy: http.ProxyFromEnvironment,
111-
HandshakeTimeout: 5 * time.Second,
111+
HandshakeTimeout: 45 * time.Second,
112112
}
113113

114114
// Dial creates a new client connection. Use requestHeader to specify the
@@ -125,7 +125,7 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
125125
if d == nil {
126126
d = &Dialer{
127127
Proxy: http.ProxyFromEnvironment,
128-
HandshakeTimeout: 5 * time.Second,
128+
HandshakeTimeout: 45 * time.Second,
129129
}
130130
}
131131

0 commit comments

Comments
 (0)