Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix net/http caching of broken persistent connections
The net/http transport code is currently broken, it keeps broken persistent connections in the cache if a write error happens during h2 handshake. This is documented in the upstream bug at: golang/go#40213 The problem occurs because in the "go" compiler the http2 code is imported into http as a bundle, with an additional "http2" prefix applied. This messes up the erringRoundTripper handling because the name doesn't match. The solution is to have the "go" compiler look for an interface instead, so we add a new dummy function that doesn't actually do anything and then the "go" compiler can check whether the specified RoundTripper implements the dummy function. Specifically for Kubernetes we need to update the http2 code in the "vendor" subdirectory. A separate change is being made in the "go" compiler. Partial-Bug: 1887438 Depends-On: https://review.opendev.org/c/starlingx/compile/+/780669 Signed-off-by: Chris Friesen <[email protected]> Change-Id: I95dcbda879973524cd23b2a374537a675ce9435f
- Loading branch information