mirror of https://github.com/gorilla/websocket.git
Bump default handshake timetout to 45 seconds
This commit is contained in:
parent
5a3d240a20
commit
df0d00cca0
|
@ -41,7 +41,7 @@ func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufS
|
||||||
NetDial: func(net, addr string) (net.Conn, error) {
|
NetDial: func(net, addr string) (net.Conn, error) {
|
||||||
return netConn, nil
|
return netConn, nil
|
||||||
},
|
},
|
||||||
HandshakeTimeout: 5 * time.Second,
|
HandshakeTimeout: 45 * time.Second,
|
||||||
}
|
}
|
||||||
return d.Dial(u.String(), requestHeader)
|
return d.Dial(u.String(), requestHeader)
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) {
|
||||||
// DefaultDialer is a dialer with all fields set to the default values.
|
// DefaultDialer is a dialer with all fields set to the default values.
|
||||||
var DefaultDialer = &Dialer{
|
var DefaultDialer = &Dialer{
|
||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
HandshakeTimeout: 5 * time.Second,
|
HandshakeTimeout: 45 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dial creates a new client connection. Use requestHeader to specify the
|
// 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
|
||||||
if d == nil {
|
if d == nil {
|
||||||
d = &Dialer{
|
d = &Dialer{
|
||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
HandshakeTimeout: 5 * time.Second,
|
HandshakeTimeout: 45 * time.Second,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue