Commit e9e8ffc7 by Carl Bergquist Committed by GitHub

Merge pull request #9367 from bobrik/dualstack

Enable dualstack in every net.Dialer, fixes #9364
parents 2ec7bbb2 9a4ae302
...@@ -25,6 +25,7 @@ var pluginProxyTransport = &http.Transport{ ...@@ -25,6 +25,7 @@ var pluginProxyTransport = &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,
} }
......
...@@ -19,6 +19,7 @@ var grafanaComProxyTransport = &http.Transport{ ...@@ -19,6 +19,7 @@ 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,
} }
......
...@@ -30,6 +30,7 @@ func Init(version string) { ...@@ -30,6 +30,7 @@ func Init(version string) {
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,
......
...@@ -24,7 +24,8 @@ type WebdavUploader struct { ...@@ -24,7 +24,8 @@ 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,
} }
......
...@@ -54,6 +54,7 @@ func (ds *DataSource) GetHttpTransport() (*http.Transport, error) { ...@@ -54,6 +54,7 @@ func (ds *DataSource) GetHttpTransport() (*http.Transport, error) {
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,
ExpectContinueTimeout: 1 * time.Second, ExpectContinueTimeout: 1 * time.Second,
......
...@@ -27,7 +27,8 @@ type Webhook struct { ...@@ -27,7 +27,8 @@ type Webhook struct {
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