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/http2: don't re-use connections that are experiencing errors #171

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

btasker
Copy link

@btasker btasker commented Apr 28, 2023

When a request on a connection fails to complete successfully,
mark the conn as doNotReuse. It's possible for requests to
fail for reasons unrelated to connection health,
but opening a new connection unnecessarily is less of an
impact than reusing a dead connection.

Fixes golang/go#59690

Also adds additional information to the GOAWAY retry test in
order to help troubleshoot observed test failures

This re-uses dniel's solution from https://go-review.googlesource.com/c/net/+/486156

btasker added 2 commits April 28, 2023 15:59
This adds @dniel's changes from https://go-review.googlesource.com/c/net/+/486156

When a request on a connection fails to complete successfully,
mark the conn as doNotReuse. It's possible for requests to
fail for reasons unrelated to connection health,
but opening a new connection unnecessarily is less of an
impact than reusing a dead connection.

Fixes golang/go#59690
@gopherbot
Copy link
Contributor

This PR (HEAD: ef8ed4e) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/490335 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x/net/http2: raciness in stream close prevents closing of failed connections, blocking subsequent requests
2 participants