net
net copied to clipboard
net/http2: don't re-use connections that are experiencing errors
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
This PR (HEAD: ef8ed4e97772f5730e72f346e13ba5a1151927e1) 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