git » gofer » commit dce4ef0

http: Extend default timeout to 60s

author Alberto Bertogli
2021-04-07 20:33:39 UTC
committer Alberto Bertogli
2021-04-07 20:33:39 UTC
parent c6aff14945a3783135cbf6ddd27669747f5dee2e

http: Extend default timeout to 60s

The current timeout of 30s can be too low over slow connection, and
cause frequent reconnections when proxying server-side events.

This patch extends the default timeout to 60s.

server/http.go +2 -2

diff --git a/server/http.go b/server/http.go
index 11211ce..6e6de29 100644
--- a/server/http.go
+++ b/server/http.go
@@ -28,8 +28,8 @@ func httpServer(addr string, conf config.HTTP) *http.Server {
 	srv := &http.Server{
 		Addr: addr,
 
-		ReadTimeout:  30 * time.Second,
-		WriteTimeout: 30 * time.Second,
+		ReadTimeout:  60 * time.Second,
+		WriteTimeout: 60 * time.Second,
 
 		ErrorLog: golog.New(ev, "", golog.Lshortfile),
 	}