Skip to content

Commit

Permalink
Add IdleTimeout to Shutdown documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdubbelboer committed Jun 18, 2021
1 parent c12a061 commit cec9953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ func (s *Server) Serve(ln net.Listener) error {
// When Shutdown is called, Serve, ListenAndServe, and ListenAndServeTLS immediately return nil.
// Make sure the program doesn't exit and waits instead for Shutdown to return.
//
// Shutdown does not close keepalive connections so its recommended to set ReadTimeout to something else than 0.
// Shutdown does not close keepalive connections so its recommended to set ReadTimeout and IdleTimeout to something else than 0.
func (s *Server) Shutdown() error {
s.mu.Lock()
defer s.mu.Unlock()
Expand Down

0 comments on commit cec9953

Please sign in to comment.