forked from mirror/client_golang
Merge pull request #420 from alileza/update-dialer
Update DefaultRoundTripper to DialContext because Dial is deprecated
This commit is contained in:
commit
d6a9817c4a
|
@ -30,10 +30,10 @@ import (
|
||||||
// DefaultRoundTripper is used if no RoundTripper is set in Config.
|
// DefaultRoundTripper is used if no RoundTripper is set in Config.
|
||||||
var DefaultRoundTripper http.RoundTripper = &http.Transport{
|
var DefaultRoundTripper http.RoundTripper = &http.Transport{
|
||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
Dial: (&net.Dialer{
|
DialContext: (&net.Dialer{
|
||||||
Timeout: 30 * time.Second,
|
Timeout: 30 * time.Second,
|
||||||
KeepAlive: 30 * time.Second,
|
KeepAlive: 30 * time.Second,
|
||||||
}).Dial,
|
}).DialContext,
|
||||||
TLSHandshakeTimeout: 10 * time.Second,
|
TLSHandshakeTimeout: 10 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue