httpserver: Set default idle timeout of 5 minutes (closes #1733)

Also clarified a comment in SiteConfig
This commit is contained in:
Matthew Holt 2017-07-27 16:01:47 -06:00
parent 32ec39cdea
commit 74940af624
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
2 changed files with 5 additions and 4 deletions

View File

@ -461,9 +461,9 @@ func (s *Server) OnStartupComplete() {
}
// defaultTimeouts stores the default timeout values to use
// if left unset by user configuration. NOTE: Default timeouts
// are disabled (see issue #1464).
var defaultTimeouts Timeouts
// if left unset by user configuration. NOTE: Most default
// timeouts are disabled (see issues #1464 and #1733).
var defaultTimeouts = Timeouts{IdleTimeout: 5 * time.Minute}
// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
// connections. It's used by ListenAndServe and ListenAndServeTLS so

View File

@ -53,7 +53,8 @@ type SiteConfig struct {
// websockets, etc.
Timeouts Timeouts
// If true all unmatched requests will be served by this site
// If true, any requests not matching other site definitions
// may be served by this site.
FallbackSite bool
}