Skip to content

net/http: mention RegisterOnShutdown in Shutdown docs #21637

Closed
@artyom

Description

@artyom

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions