add timeout
All checks were successful
Build and push image / deploy (push) Successful in 2m6s

This commit is contained in:
2023-12-28 19:03:38 +03:00
parent 2bafbc3466
commit f983091e2b

View File

@ -8,6 +8,7 @@ import (
"net/http"
"net/url"
"os"
"time"
)
//https://www.reddit.com/r/golang/comments/ezg1ka/how_can_i_specify_a_proxy_server_when_using/
@ -45,7 +46,10 @@ func ParseProxies(r io.Reader) ([]*http.Client, error) {
Proxy: http.ProxyURL(proxyURL),
}
client := &http.Client{Transport: transport}
client := &http.Client{
Transport: transport,
Timeout: 1 * time.Minute,
}
clients = append(clients, client)