Commit c13e302c by Marcus Efraimsson Committed by GitHub

Merge pull request #15356 from grafana/15258_fix

revert ds_proxy timeout and implement dataproxy timeout correctly
parents 5e6c746c a1cd550d
......@@ -54,7 +54,7 @@ func NewDataSourceProxy(ds *m.DataSource, plugin *plugins.DataSourcePlugin, ctx
func newHTTPClient() httpClient {
return &http.Client{
Timeout: time.Duration(setting.DataProxyTimeout) * time.Second,
Timeout: 30 * time.Second,
Transport: &http.Transport{Proxy: http.ProxyFromEnvironment},
}
}
......
......@@ -8,6 +8,8 @@ import (
"net/http"
"sync"
"time"
"github.com/grafana/grafana/pkg/setting"
)
type proxyTransportCache struct {
......@@ -57,7 +59,7 @@ func (ds *DataSource) GetHttpTransport() (*http.Transport, error) {
TLSClientConfig: tlsConfig,
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{
Timeout: 30 * time.Second,
Timeout: time.Duration(setting.DataProxyTimeout) * time.Second,
KeepAlive: 30 * time.Second,
DualStack: true,
}).Dial,
......
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