client: replace dial with dialContext

release-3.5
luqi 2020-10-27 12:43:14 +08:00
parent 7da5182f1d
commit ed81d2e2db
1 changed files with 2 additions and 2 deletions

View File

@ -48,10 +48,10 @@ var DefaultRequestTimeout = 5 * time.Second
var DefaultTransport CancelableTransport = &http.Transport{
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).Dial,
}).DialContext,
TLSHandshakeTimeout: 10 * time.Second,
}