From 3be5c17638a734d46729f9518f52070bb7f1d91b Mon Sep 17 00:00:00 2001 From: mikemenzies Date: Mon, 8 Oct 2018 18:43:39 -0500 Subject: [PATCH] Timeout fix HTTP write timeout should match script run timeout --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index c9f0cdc..c5d350e 100644 --- a/main.go +++ b/main.go @@ -222,7 +222,7 @@ func main() { http.Handle(*metricsPath+"/", sh) http.Handle(*metricsPath, promhttp.Handler()) - srv := &http.Server{Addr: *listenAddress, ReadTimeout: 5 * time.Second, WriteTimeout: 5 * time.Second} + srv := &http.Server{Addr: *listenAddress, ReadTimeout: 5 * time.Second, WriteTimeout: *timeout} if err := srv.ListenAndServe(); err != nil { log.Fatalf("Unable to setup HTTP server: %v", err) }