diff --git a/service/main.go b/service/main.go index d7d8300..b2083e9 100644 --- a/service/main.go +++ b/service/main.go @@ -70,6 +70,10 @@ func main() { if err != nil { log.Fatalln("Unable to bind client to address:", err) } + } else { + api.Client = &http.Client{ + Timeout: 15 * time.Second, + } } if config.Cache != "" { @@ -148,8 +152,8 @@ func constructBoundClient(addr string) (*http.Client, error) { dialer := &net.Dialer{ LocalAddr: &localTCPAddr, - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, + Timeout: 15 * time.Second, + KeepAlive: 15 * time.Second, } return &http.Client{