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.
master
Harshavardhana 10 years ago
parent e0d78e7381
commit a9aaff0ee0
  1. 7
      pkg/server/httpserver/httpserver.go

@ -19,7 +19,7 @@ package httpserver
import (
"log"
"net/http"
"time"
// "time"
)
type HttpServerConfig struct {
@ -48,8 +48,9 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error,
httpServer := &http.Server{
Addr: config.Address,
Handler: router,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
// 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)

Loading…
Cancel
Save