Update DefaultRoundTripper to DialContext because Dial is deprecated

Signed-off-by: alileza <alirezayahya@gmail.com>
This commit is contained in:
alileza 2018-06-27 12:02:52 +02:00
parent 77e8f2ddcf
commit bc3c7b9dd1
1 changed files with 2 additions and 2 deletions

View File

@ -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,
}