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
Assignees
Milestone

Comments

@nhooyr
Copy link
Contributor

@nhooyr 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

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jun 2, 2016

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 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

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Sep 26, 2016

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

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 15, 2016

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

@gopherbot gopherbot closed this in faf882d Oct 18, 2016
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.