common/http: use a default timeout of 30 seconds for HTTP client

This commit is contained in:
Vincent Bernat
2022-04-12 07:17:39 +02:00
parent 80a99a4050
commit 4ede84b46e

View File

@@ -200,4 +200,5 @@ func (c *Component) Stop() error {
func init() {
// Disable proxy for client
http.DefaultTransport.(*http.Transport).Proxy = nil
http.DefaultClient.Timeout = 30 * time.Second
}