forked from TrueCloudLab/rclone
serve http: Fix timeouts
This commit is contained in:
parent
6669165b6b
commit
2740c965c0
1 changed files with 5 additions and 5 deletions
|
@ -77,8 +77,8 @@ func (s *server) serve() {
|
||||||
httpServer := &http.Server{
|
httpServer := &http.Server{
|
||||||
Addr: s.bindAddress,
|
Addr: s.bindAddress,
|
||||||
Handler: mux,
|
Handler: mux,
|
||||||
ReadTimeout: 10 * time.Second,
|
ReadHeaderTimeout: 10 * time.Second, // time to send the headers
|
||||||
WriteTimeout: 10 * time.Second,
|
IdleTimeout: 60 * time.Second, // time to keep idle connections open
|
||||||
MaxHeaderBytes: 1 << 20,
|
MaxHeaderBytes: 1 << 20,
|
||||||
}
|
}
|
||||||
fs.Logf(s.f, "Serving on http://%s/", bindAddress)
|
fs.Logf(s.f, "Serving on http://%s/", bindAddress)
|
||||||
|
|
Loading…
Reference in a new issue