-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http/httputil: make Switching Protocol requests (e.g. Websockets) cancelable #38021
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
Conversation
This PR (HEAD: f69f4f9) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Emmanuel Odeke: Patch Set 1: (24 comments) Thank you for this change Pierre and welcome to the Go project! I have added some suggestions, please take a look. Also given that Thank you again and I look forward to interacting with you more here! Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Emmanuel Odeke: Patch Set 1: Pierre, please also rebase your change with the latest from master. Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
This PR (HEAD: 971136b) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: 3f4b10e) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: f6dda0a) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: d2f204c) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
Hi @odeke-em, I think I've treated more or less all of your review :) |
Message from Emmanuel Odeke: Patch Set 8: Run-TryBot+1 Code-Review+2 (24 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Gobot Gobot: Patch Set 8: TryBots beginning. Status page: https://farmer.golang.org/try?commit=cd25068e Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Gobot Gobot: Patch Set 8: Build is still in progress... Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Gobot Gobot: Patch Set 8: TryBot-Result-1 1 of 20 TryBots failed: Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Is the goroutine scheduling different on the wasm runtime? |
Message from Emmanuel Odeke: Patch Set 8: -Code-Review Kind ping Pierre, it's been 3 weeks since last ping and the Go tree closes in 10 days or so. Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Hi @odeke-em, |
This PR (HEAD: 4d313e3) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
Tested locally with (GOOS=linux, GOARCH=amd64) and (GOOS=js, GOARCH=wasm). |
Message from Pierre Carru: Patch Set 9: Hi Emmanuel, I'm not sure that you read the original github issue so I'm copying:
Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Brad Fitzpatrick: Patch Set 9: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
This PR (HEAD: 7747606) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
Message from Pierre Carru: Patch Set 10: I think that should do it Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Emmanuel Odeke: Patch Set 10: Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Gobot Gobot: Patch Set 10: TryBots beginning. Status page: https://farmer.golang.org/try?commit=622f2854 Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Gobot Gobot: Patch Set 10: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Emmanuel Odeke: Patch Set 10: Code-Review+2 (1 comment) Thank you Pierre, just one more change and we’ll be good to go. Brad, after my suggested naming change, does this look good to you? RELNOTE=yes Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
This PR (HEAD: 72dd144) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
Message from Pierre Carru: Patch Set 11: OK, just did it -- I mean Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Emmanuel Odeke: Patch Set 11: (1 comment)
close is more idiomatic and ensures that the channel won’t be laying around and will always be closed so any future receives will be immediate. There is still unaddressed feedback. Please take a look. Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
This PR (HEAD: 3629c78) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/224897 to see it. Tip: You can toggle comments from me using the |
Message from Pierre Carru: Patch Set 12: Oh right I hadn't noticed it Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Emmanuel Odeke: Patch Set 12: Run-TryBot+1 Cool, thank you for the update Pierre! Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Gobot Gobot: Patch Set 12: TryBots beginning. Status page: https://farmer.golang.org/try?commit=f30f48ab Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
Message from Gobot Gobot: Patch Set 12: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
… cancelable Ensures that a canceled client request for Switching Protocols (e.g. h2c, Websockets) will cause the underlying connection to be terminated. Adds a goroutine in handleUpgradeResponse in order to select on the incoming client request's context and appropriately cancel it. Fixes #35559 Change-Id: I1238e18fd4cce457f034f78d9cdce0e7f93b8bf6 GitHub-Last-Rev: 3629c78 GitHub-Pull-Request: #38021 Reviewed-on: https://go-review.googlesource.com/c/go/+/224897 Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
Message from Emmanuel Odeke: Patch Set 12: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/224897. |
This PR is being closed because golang.org/cl/224897 has been merged. |
… cancelable Ensures that a canceled client request for Switching Protocols (e.g. h2c, Websockets) will cause the underlying connection to be terminated. Adds a goroutine in handleUpgradeResponse in order to select on the incoming client request's context and appropriately cancel it. Fixes golang#35559 Change-Id: I1238e18fd4cce457f034f78d9cdce0e7f93b8bf6 GitHub-Last-Rev: 3629c78 GitHub-Pull-Request: golang#38021 Reviewed-on: https://go-review.googlesource.com/c/go/+/224897 Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
Ensures that a canceled client request for Switching Protocols
(e.g. h2c, Websockets) will cause the underlying connection to
be terminated.
Adds a goroutine in handleUpgradeResponse in order to select on
the incoming client request's context and appropriately cancel it.
Fixes #35559