Update DefaultRoundTripper to DialContext because Dial is deprecated
Signed-off-by: alileza <alirezayahya@gmail.com>
This commit is contained in:
parent
77e8f2ddcf
commit
bc3c7b9dd1
|
@ -30,10 +30,10 @@ import (
|
|||
// DefaultRoundTripper is used if no RoundTripper is set in Config.
|
||||
var DefaultRoundTripper http.RoundTripper = &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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue