Commit a86b8c8a by Carl Bergquist Committed by GitHub

http: remove dualstack since its deprecated (#16940)

Deprecated: Fast Fallback is enabled by default. To
disable, set FallbackDelay to a negative value.

https://golang.org/src/net/dial.go
parent b426ff52
...@@ -27,7 +27,6 @@ func (hs *HTTPServer) initAppPluginRoutes(r *macaron.Macaron) { ...@@ -27,7 +27,6 @@ func (hs *HTTPServer) initAppPluginRoutes(r *macaron.Macaron) {
Dial: (&net.Dialer{ Dial: (&net.Dialer{
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second, KeepAlive: 30 * time.Second,
DualStack: true,
}).Dial, }).Dial,
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second,
} }
......
...@@ -17,7 +17,6 @@ var grafanaComProxyTransport = &http.Transport{ ...@@ -17,7 +17,6 @@ var grafanaComProxyTransport = &http.Transport{
Dial: (&net.Dialer{ Dial: (&net.Dialer{
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second, KeepAlive: 30 * time.Second,
DualStack: true,
}).Dial, }).Dial,
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second,
} }
......
...@@ -32,7 +32,6 @@ func Init(version string, skipTLSVerify bool) { ...@@ -32,7 +32,6 @@ func Init(version string, skipTLSVerify bool) {
DialContext: (&net.Dialer{ DialContext: (&net.Dialer{
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second, KeepAlive: 30 * time.Second,
DualStack: true,
}).DialContext, }).DialContext,
MaxIdleConns: 100, MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second, IdleConnTimeout: 90 * time.Second,
......
...@@ -25,8 +25,7 @@ type WebdavUploader struct { ...@@ -25,8 +25,7 @@ type WebdavUploader struct {
var netTransport = &http.Transport{ var netTransport = &http.Transport{
Proxy: http.ProxyFromEnvironment, Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{ Dial: (&net.Dialer{
Timeout: 60 * time.Second, Timeout: 60 * time.Second,
DualStack: true,
}).Dial, }).Dial,
TLSHandshakeTimeout: 5 * time.Second, TLSHandshakeTimeout: 5 * time.Second,
} }
......
...@@ -61,7 +61,6 @@ func (ds *DataSource) GetHttpTransport() (*http.Transport, error) { ...@@ -61,7 +61,6 @@ func (ds *DataSource) GetHttpTransport() (*http.Transport, error) {
Dial: (&net.Dialer{ Dial: (&net.Dialer{
Timeout: time.Duration(setting.DataProxyTimeout) * time.Second, Timeout: time.Duration(setting.DataProxyTimeout) * time.Second,
KeepAlive: 30 * time.Second, KeepAlive: 30 * time.Second,
DualStack: true,
}).Dial, }).Dial,
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second, ExpectContinueTimeout: 1 * time.Second,
......
...@@ -32,8 +32,7 @@ var netTransport = &http.Transport{ ...@@ -32,8 +32,7 @@ var netTransport = &http.Transport{
}, },
Proxy: http.ProxyFromEnvironment, Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{ Dial: (&net.Dialer{
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
DualStack: true,
}).Dial, }).Dial,
TLSHandshakeTimeout: 5 * time.Second, TLSHandshakeTimeout: 5 * time.Second,
} }
......
...@@ -15,8 +15,7 @@ import ( ...@@ -15,8 +15,7 @@ import (
var netTransport = &http.Transport{ var netTransport = &http.Transport{
Proxy: http.ProxyFromEnvironment, Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{ Dial: (&net.Dialer{
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
DualStack: true,
}).Dial, }).Dial,
TLSHandshakeTimeout: 5 * time.Second, TLSHandshakeTimeout: 5 * time.Second,
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment