0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

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
}