Commit c875cea7 authored by Artyom Pervukhin's avatar Artyom Pervukhin Committed by Tom Bergan

net/http: mention RegisterOnShutdown in Server.Shutdown docs

Closes #21637

Change-Id: Icc3528572ea2a25e62757cc8fbbb9c3fa96a78b2
Reviewed-on: https://go-review.googlesource.com/59350Reviewed-by: default avatarTom Bergan <tombergan@google.com>
parent a2f22a68
......@@ -2487,7 +2487,8 @@ var shutdownPollInterval = 500 * time.Millisecond
// Shutdown does not attempt to close nor wait for hijacked
// connections such as WebSockets. The caller of Shutdown should
// separately notify such long-lived connections of shutdown and wait
// for them to close, if desired.
// for them to close, if desired. See RegisterOnShutdown for a way to
// register shutdown notification functions.
func (srv *Server) Shutdown(ctx context.Context) error {
atomic.AddInt32(&srv.inShutdown, 1)
defer atomic.AddInt32(&srv.inShutdown, -1)
......
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