]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: mention RegisterOnShutdown in Server.Shutdown docs
authorArtyom Pervukhin <artyom.pervukhin@gmail.com>
Sun, 27 Aug 2017 08:30:19 +0000 (11:30 +0300)
committerTom Bergan <tombergan@google.com>
Mon, 28 Aug 2017 16:17:58 +0000 (16:17 +0000)
Closes #21637

Change-Id: Icc3528572ea2a25e62757cc8fbbb9c3fa96a78b2
Reviewed-on: https://go-review.googlesource.com/59350
Reviewed-by: Tom Bergan <tombergan@google.com>
src/net/http/server.go

index 7312f4850f13a070215b702043d4a5b094a8cc22..cf6d2a079d09cbac32d0e7f2caa06ddb18aeb358 100644 (file)
@@ -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)