Datasource: Make sure data proxy timeout applies to HTTP client (#25865)

For backend data sources executing in the backend (not through data proxy) make 
sure that the timeout applies to cached HTTP client.

Fixes #25863

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
Marcus Efraimsson
2020-06-29 11:22:49 +02:00
committed by GitHub
co-authored by Diana Payton
parent 383aa21ab6
commit 460b01f1fe
4 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ func (ds *DataSource) GetHttpClient() (*http.Client, error) {
}
return &http.Client{
Timeout: 30 * time.Second,
Timeout: time.Duration(setting.DataProxyTimeout) * time.Second,
Transport: transport,
}, nil
}