diff options
author | Michael Fraenkel <michael.fraenkel@gmail.com> | 2020-12-02 17:07:27 -0700 |
---|---|---|
committer | Dmitri Shuralyov <dmitshur@golang.org> | 2021-03-02 21:03:59 +0000 |
commit | 1c60e0d928764b1b755c494d4a760eb51b99bc90 (patch) | |
tree | dfd0a4144f246206b13cb22466fe9a850012c6c2 /VERSION | |
parent | 5de8d3bfcb060bbc61b9b9c945055fd3fb5b9607 (diff) | |
download | go-1c60e0d928764b1b755c494d4a760eb51b99bc90.tar.gz go-1c60e0d928764b1b755c494d4a760eb51b99bc90.zip |
[release-branch.go1.15] net/http: add connections back that haven't been canceled
Issue #41600 fixed the issue when a second request canceled a connection
while the first request was still in roundTrip.
This uncovered a second issue where a request was being canceled (in
roundtrip) but the connection was put back into the idle pool for a
subsequent request.
The fix is the similar except its now in readLoop instead of roundTrip.
A persistent connection is only added back if it successfully removed
the cancel function; otherwise we know the roundTrip has started
cancelRequest.
Fixes #42935.
Updates #42942.
Change-Id: Ia56add20880ccd0c1ab812d380d8628e45f6f44c
Reviewed-on: https://go-review.googlesource.com/c/go/+/274973
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
(cherry picked from commit 854a2f8e01a554d8052445563863775406a04b71)
Reviewed-on: https://go-review.googlesource.com/c/go/+/297910
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'VERSION')
0 files changed, 0 insertions, 0 deletions