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

x/net/http2: verify that net/http.Server.SetKeepAlivesEnabled(false) shuts down HTTP/2 server #26303

bradfitz opened this issue Jul 9, 2018 · 3 comments
help wanted NeedsFix


Copy link

@bradfitz bradfitz commented Jul 9, 2018

Per #20239 (comment) and its immediate reply, it seems that might've broken net/http.Server.SetKeepAlivesEnabled(false) shutting down HTTP/2 server connections.

I guess there's no test for it.

/cc @tombergan @pam4

@bradfitz bradfitz added help wanted NeedsFix labels Jul 9, 2018
@bradfitz bradfitz added this to the Go1.12 milestone Jul 9, 2018
Copy link
Contributor Author

@bradfitz bradfitz commented Jul 9, 2018

There is TestServerSetKeepAlivesEnabledClosesConns in serve_test.go, but it's only for HTTP/1.

Copy link

@gopherbot gopherbot commented Jul 9, 2018

Change mentions this issue: net/http: remove dead code noted in post-submit review of CL 81778

gopherbot pushed a commit that referenced this issue Jul 10, 2018
Per comments in #20239 (comment)

Updates #20239
Updates #26303

Change-Id: Iddf34c0452bd30ca9111b951bca48d1e011bd85a
Run-TryBot: Brad Fitzpatrick <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Ian Lance Taylor <>
Copy link

@fraenkel fraenkel commented Jul 10, 2018

This is actually difficult to test given how the current code works.
The h1ServerKeepAlivesDisabled checks for an interface which only works if its executed within the http package.

@andybons andybons removed this from the Go1.12 milestone Feb 12, 2019
@andybons andybons added this to the Go1.13 milestone Feb 12, 2019
@andybons andybons removed this from the Go1.13 milestone Jul 8, 2019
@andybons andybons added this to the Go1.14 milestone Jul 8, 2019
@rsc rsc removed this from the Go1.14 milestone Oct 9, 2019
@rsc rsc added this to the Backlog milestone Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
help wanted NeedsFix
None yet

No branches or pull requests

5 participants