Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: mention RegisterOnShutdown in Shutdown docs #21637

Closed
artyom opened this issue Aug 26, 2017 · 2 comments
Closed

net/http: mention RegisterOnShutdown in Shutdown docs #21637

artyom opened this issue Aug 26, 2017 · 2 comments

Comments

@artyom
Copy link
Member

artyom commented Aug 26, 2017

http.Server.RegisterOnShutdown was introduced in 1.9 cycle, but it's not mentioned in the release notes, so it's easy to miss, even if it's useful to you.

Documentation for http.Server.Shutdown (that was introduced in 1.8) states:

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.

IMO this is a good place to mention the new RegisterOnShutdown method to increase awareness of its existence.

@odeke-em
Copy link
Member

@artyom thank you for noticing and reporting this! Would you like to make a CL for this?

Meanwhile I'll ping @bradfitz @rsc @broady on whether we can retroactively update these docs.

@gopherbot
Copy link

Change https://golang.org/cl/59350 mentions this issue: net/http: mention RegisterOnShutdown in Server.Shutdown docs

@golang golang locked and limited conversation to collaborators Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants