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: cancel context when underlying connection closes #15927

Closed
nhooyr opened this issue Jun 2, 2016 · 3 comments
Closed

net/http: cancel context when underlying connection closes #15927

nhooyr opened this issue Jun 2, 2016 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2016

There was a comment on http.Request.Context that said that when the underlying connection closes, the context would be cancelled. However, this has not been implemented.

I'm not sure if we want to do this because it would double the number of goroutines running and I'm not sure exactly how to implement it because http.CloseNotifier is incompatible with http.Hijacker.

@gopherbot
Copy link

CL https://golang.org/cl/23672 mentions this issue.

@adg adg added this to the Go1.8 milestone Jun 2, 2016
@adg adg added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 2, 2016
gopherbot pushed a commit that referenced this issue Jun 2, 2016
The comment on http.Request.Context says that the context
is canceled when the client's connection closes even though
this has not been implemented. See #15927

Change-Id: I50b68638303dafd70f77f8f778e6caff102d3350
Reviewed-on: https://go-review.googlesource.com/23672
Reviewed-by: Andrew Gerrand <adg@golang.org>
@bradfitz
Copy link
Contributor

I finally have a plan for this! Or rather, I have a plan for #15224 now which will make fixing this bug possible. I'll post details in #15224.

@gopherbot
Copy link

CL https://golang.org/cl/31173 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants