Skip to content

Commit

Permalink
server: http.Server do not add deadlines causes issues. (minio#2581)
Browse files Browse the repository at this point in the history
Adding deadlines is a no go since Golang doesn't back off
the timers if there is an active i/o in progress.

It is meant to be for applications to handle this themselves
and manually progress the deadlines.

Fixes minio#2561
  • Loading branch information
harshavardhana authored Aug 30, 2016
1 parent 7431acb commit 2020afd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/server-mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ func NewMuxServer(addr string, handler http.Handler) *MuxServer {
m := &MuxServer{
Server: http.Server{
Addr: addr,
// Adding timeout of 10 minutes for unresponsive client connections.
ReadTimeout: 10 * time.Minute,
WriteTimeout: 10 * time.Minute,
// Do not add any timeouts Golang net.Conn
// closes connections right after 10mins even
// if they are not idle.
Handler: handler,
MaxHeaderBytes: 1 << 20,
},
Expand Down

0 comments on commit 2020afd

Please sign in to comment.