-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: HTTP/2 response body Close method sometimes returns spurious context cancelation error (1.17.3 regression) [1.16 backport] #49558
Comments
Hi! I've been keeping track of the original issue where the reporter mentioned the problem was introduced in version 1.17.3. |
Yes, this will be in 1.16.10 as well. |
Change https://golang.org/cl/368084 mentions this issue: |
Closed by merging 5a93142 to release-branch.go1.16. |
…sponse body read When sending a Request with a non-context deadline, we create a context with a timeout. This context is canceled when closing the response body, and also if a read from the response body returns an error (including io.EOF). Cancelling the context in Response.Body.Read interferes with the HTTP/2 client cleaning up after a request is completed, and is unnecessary: The user should always close the body, the impact from not canceling the context is minor (the context timer leaks until it fires). For #49366. Fixes #49558. Change-Id: Ieaed866116916261d9079f71d8fea7a7b303b8fb Reviewed-on: https://go-review.googlesource.com/c/go/+/361919 Trust: Damien Neil <[email protected]> Run-TryBot: Damien Neil <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> (cherry picked from commit 76fbd61) Reviewed-on: https://go-review.googlesource.com/c/go/+/368084 Reviewed-by: Michael Knyszek <[email protected]>
@neild requested issue #49366 to be considered for backport to the next 1.16 minor release.
The text was updated successfully, but these errors were encountered: