• Brad Fitzpatrick's avatar
    net/http: fix Transport crash when abandoning dial which upgrades protos · 70ee5252
    Brad Fitzpatrick authored
    When the Transport was creating an bound HTTP connection (protocol
    unknown initially) and then ends up deciding it doesn't need it, a
    goroutine sits around to clean up whatever the result was. That
    goroutine made the false assumption that the result was always an
    HTTP/1 connection or an error. It may also be an alternate protocol
    in which case the *persistConn.conn net.Conn field is nil, and the
    alt field is non-nil.
    
    Fixes #13839
    
    Change-Id: Ia4972e5eb1ad53fa00410b3466d4129c753e0871
    Reviewed-on: https://go-review.googlesource.com/18573Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    70ee5252
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...