mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 02:09:47 +08:00
httpserver: Set default idle timeout of 5 minutes (closes #1733)
Also clarified a comment in SiteConfig
This commit is contained in:
parent
32ec39cdea
commit
74940af624
|
@ -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 {
|
||||||
// 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user