]> Cypherpunks repositories - gostls13.git/commit
net/http: Add Server.RegisterOnShutdown
authorTom Bergan <tombergan@google.com>
Tue, 23 May 2017 23:03:21 +0000 (16:03 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 23 May 2017 23:52:37 +0000 (23:52 +0000)
commit1a63f116c11acdbd1b11c38dbdcaeb4e4ba0a94e
tree3cef7bab289f1c593aa151d5d8c3a0688922425e
parent6374a6607ba601b8d15514b0ce9462ea50fed0a5
net/http: Add Server.RegisterOnShutdown

This will be used to allow http2 servers to register a shutdown function
so that net/http.Server.Shutdown will work when the http2 server is
configured via a manual call to http2.ConfigureServer. Currently, Shutdown
only works when the http2 server is configured automatically by the
net/http package.

Updates #20302
Updates #18471

Change-Id: Ifc2b5f3126126a106b49ea4a7e999279852b9cc9
Reviewed-on: https://go-review.googlesource.com/44003
Run-TryBot: Tom Bergan <tombergan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/serve_test.go
src/net/http/server.go