Set Go 1.8's ReadHeaderTimeout and IdleTimeout

This commit is contained in:
Matthew Holt
2017-01-24 20:09:03 -07:00
parent 139a3cfb13
commit d264a2cf0a
2 changed files with 8 additions and 10 deletions

View File

@@ -394,11 +394,10 @@ func makeHTTPServer(addr string, group []*SiteConfig) *http.Server {
}
// set the final values on the server
// TODO: ReadHeaderTimeout and IdleTimeout require Go 1.8
s.ReadTimeout = min.ReadTimeout
// s.ReadHeaderTimeout = min.ReadHeaderTimeout
s.ReadHeaderTimeout = min.ReadHeaderTimeout
s.WriteTimeout = min.WriteTimeout
// s.IdleTimeout = min.IdleTimeout
s.IdleTimeout = min.IdleTimeout
return s
}