From b5c413f206346843b89d9c3e0496e01d7540f5ce Mon Sep 17 00:00:00 2001 From: Brian Dwyer Date: Fri, 6 Aug 2021 15:47:09 -0400 Subject: [PATCH] Make timeouts more aggressive -- seems to get rid of stalls with lots of connections --- pkg/gontlm-proxy.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/gontlm-proxy.go b/pkg/gontlm-proxy.go index 4f3beb1..687f61b 100644 --- a/pkg/gontlm-proxy.go +++ b/pkg/gontlm-proxy.go @@ -191,8 +191,10 @@ func Run() { http.DefaultClient.Timeout = 10 * time.Second srv := &http.Server{ - Handler: proxy, - IdleTimeout: time.Second * 60, + Handler: proxy, + IdleTimeout: 5 * time.Second, + ReadTimeout: 5 * time.Second, + WriteTimeout: 10 * time.Second, } listener, err := net.Listen("tcp4", bind.Host) if err != nil {