From 6df05e489dc789cf26e82810cf5cfeefb1d90761 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 27 Mar 2019 09:40:06 -0700 Subject: [PATCH] Set Read/Write timeouts only for net.Conn not http.Server (#7431) Fixes #7425 --- cmd/http/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/http/server.go b/cmd/http/server.go index 54bda8d9e..90fe1cd83 100644 --- a/cmd/http/server.go +++ b/cmd/http/server.go @@ -57,6 +57,8 @@ const ( type Server struct { http.Server Addrs []string // addresses on which the server listens for new connection. + ReadTimeout time.Duration // timeout used for net.Conn.Read() deadlines. + WriteTimeout time.Duration // timeout used for net.Conn.Write() deadlines. ShutdownTimeout time.Duration // timeout used for graceful server shutdown. TCPKeepAliveTimeout time.Duration // timeout used for underneath TCP connection. UpdateBytesReadFunc func(int) // function to be called to update bytes read in bufConn.