Commit 74940af6 authored by Matthew Holt's avatar Matthew Holt

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

Also clarified a comment in SiteConfig
parent 32ec39cd
...@@ -461,9 +461,9 @@ func (s *Server) OnStartupComplete() { ...@@ -461,9 +461,9 @@ func (s *Server) OnStartupComplete() {
} }
// defaultTimeouts stores the default timeout values to use // defaultTimeouts stores the default timeout values to use
// if left unset by user configuration. NOTE: Default timeouts // if left unset by user configuration. NOTE: Most default
// are disabled (see issue #1464). // timeouts are disabled (see issues #1464 and #1733).
var defaultTimeouts Timeouts var defaultTimeouts = Timeouts{IdleTimeout: 5 * time.Minute}
// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted // tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
// connections. It's used by ListenAndServe and ListenAndServeTLS so // connections. It's used by ListenAndServe and ListenAndServeTLS so
......
...@@ -53,7 +53,8 @@ type SiteConfig struct { ...@@ -53,7 +53,8 @@ type SiteConfig struct {
// websockets, etc. // websockets, etc.
Timeouts Timeouts 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 FallbackSite bool
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment