Skip to content

x/net/http2/h2c: support closure of all connections and graceful shutdown #26682

@nhooyr

Description

@nhooyr

Very happy to see h2c supported: golang/net@c4299a1

However, there is no way to enable graceful shutdown, or even close all h2c connections. We should support this.

You could use http2.ConfigureServer to configure a http2 server's graceful shutdown to be called when the http server is shutdown but the http server's shutdown method will not wait for the http2 connections to close because they have been hijacked.

I think it'd be simplest if we added a Shutdown and Close method to *http2.Server analogous to *http.Server's methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions