ea1437a8cd
If an error occurs during the HTTP/2 upgrade phase, originally this resulted in a pconn with pconn.alt set to an http2erringRoundTripper, which always fails. This is not wanted - we want to retry in this case. CL 202078 added a check for the http2erringRoundTripper to treat it as a failed pconn, but the handling of the failure was wrong in the case where the pconn is not in the idle list at all (common in HTTP/2). This made the added test TestDontCacheBrokenHTTP2Conn flaky. CL 218097 (unsubmitted) proposed to expand the handling of the http2erringRoundTripper after the new check, to dispose of the pconn more thoroughly. Bryan Mills pointed out in that review that we probably shouldn't make the never-going-to-work pconn in the first place. This CL changes the upgrade phase look for the http2erringRoundTripper and return the underlying error instead of claiming to have a working connection. Having done that, the CL undoes the change in CL 202078 and with it the need for CL 218097, but it keeps the new test added by CL 202078. On my laptop, before this commit, TestDontCacheBrokenHTTP2Conn failed 66 times out of 20,000. With this commit, I see 0 out of 20,000. Fixes #34978. Fixes #35113. Change-Id: Ibd908b63c2ae96e159e8e604213d8373afb350e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/220905 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
favicon.ico | ||
LICENSE | ||
PATENTS | ||
README.md | ||
robots.txt | ||
SECURITY.md |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.