diff options
| author | Artyom Pervukhin <artyom.pervukhin@gmail.com> | 2017-08-27 11:30:19 +0300 |
|---|---|---|
| committer | Tom Bergan <tombergan@google.com> | 2017-08-28 16:17:58 +0000 |
| commit | c875cea7ae174f723aed10ea31911cd7013ee261 (patch) | |
| tree | 4f01548ca4f1fa70c7fd33ca03bfc48786a736ad /src/net/http/server.go | |
| parent | a2f22a680317aa00cd82ac5c946a18db268a1025 (diff) | |
| download | go-c875cea7ae174f723aed10ea31911cd7013ee261.tar.xz | |
net/http: mention RegisterOnShutdown in Server.Shutdown docs
Closes #21637
Change-Id: Icc3528572ea2a25e62757cc8fbbb9c3fa96a78b2
Reviewed-on: https://go-review.googlesource.com/59350
Reviewed-by: Tom Bergan <tombergan@google.com>
Diffstat (limited to 'src/net/http/server.go')
| -rw-r--r-- | src/net/http/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go index 7312f4850f..cf6d2a079d 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -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) |
