From 8c40c0b5bde0d67e79aeda4274a303ebcb4cebc3 Mon Sep 17 00:00:00 2001 From: Pablo Carranza Date: Tue, 6 Mar 2018 00:35:16 +0100 Subject: [PATCH] Bump default handshake timetout to 45 seconds --- client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index c42d70c..79e9805 100644 --- a/client.go +++ b/client.go @@ -41,7 +41,7 @@ func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufS NetDial: func(net, addr string) (net.Conn, error) { return netConn, nil }, - HandshakeTimeout: 5 * time.Second, + HandshakeTimeout: 45 * time.Second, } 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. var DefaultDialer = &Dialer{ Proxy: http.ProxyFromEnvironment, - HandshakeTimeout: 5 * time.Second, + HandshakeTimeout: 45 * time.Second, } // 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 { d = &Dialer{ Proxy: http.ProxyFromEnvironment, - HandshakeTimeout: 5 * time.Second, + HandshakeTimeout: 45 * time.Second, } }