From a9aaff0ee0574d728fe4379b59efe11fd2d3f49e Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 24 Feb 2015 13:55:20 -0800 Subject: [PATCH] Remove HTTP server timeouts write and read. Implement it later with a proper timer thread. Large file transfers from 'mc' fail with i/o timeout without this change. --- pkg/server/httpserver/httpserver.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/server/httpserver/httpserver.go b/pkg/server/httpserver/httpserver.go index 5f8e6f7e5..59dd404a5 100644 --- a/pkg/server/httpserver/httpserver.go +++ b/pkg/server/httpserver/httpserver.go @@ -19,7 +19,7 @@ package httpserver import ( "log" "net/http" - "time" + // "time" ) type HttpServerConfig struct { @@ -46,10 +46,11 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error, // Minio server config httpServer := &http.Server{ - Addr: config.Address, - Handler: router, - ReadTimeout: 10 * time.Second, - WriteTimeout: 10 * time.Second, + Addr: config.Address, + Handler: router, + // TODO add this later with a proper timer thread + // ReadTimeout: 20 * time.Second, + // WriteTimeout: 20 * time.Second, MaxHeaderBytes: 1 << 20, } log.Println("Starting HTTP Server on:", config.Address)