Skip to content
Snippets Groups Projects
Commit af7bf886 authored by ale's avatar ale
Browse files

Drop WriteTimeout on the default http.Server

It was acting as an upper limit for the request lifetime, which isn't
necessary on internal services.
parent 8379601a
No related branches found
No related tags found
No related merge requests found
......@@ -72,11 +72,10 @@ func (config *ServerConfig) buildHTTPServer(h http.Handler) (*http.Server, error
// can be generous with the timeouts to keep the number of
// reconnections low.
return &http.Server{
Handler: addDefaultHandlers(h),
ReadTimeout: 30 * time.Second,
WriteTimeout: 30 * time.Second,
IdleTimeout: 600 * time.Second,
TLSConfig: tlsConfig,
Handler: addDefaultHandlers(h),
ReadHeaderTimeout: 30 * time.Second,
IdleTimeout: 600 * time.Second,
TLSConfig: tlsConfig,
}, nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment