Use refresh timeout for http

This commit is contained in:
nytpu
2021-03-23 08:13:48 -06:00
parent 54e883a1d1
commit c6b0eedebe
+1 -1
View File
@@ -26,7 +26,7 @@ import (
// fetchHTTP will make a request for an http resource // fetchHTTP will make a request for an http resource
func fetchHTTP(remoteURL string) (*http.Response, error) { func fetchHTTP(remoteURL string) (*http.Response, error) {
client := &http.Client{ client := &http.Client{
Timeout: 10 * time.Second, Timeout: time.Duration(core.Timeout) * time.Second,
} }
req, err := http.NewRequestWithContext(context.Background(), "GET", remoteURL, nil) req, err := http.NewRequestWithContext(context.Background(), "GET", remoteURL, nil)