]> Cypherpunks repositories - gostls13.git/commit
net/http: fix data race due to writeLoop goroutine left running
authorSteven Hartland <steven.hartland@multiplay.co.uk>
Mon, 31 Aug 2020 20:37:40 +0000 (21:37 +0100)
committerBryan C. Mills <bcmills@google.com>
Wed, 9 Sep 2020 21:25:35 +0000 (21:25 +0000)
commit2c8d2a0c51f4085e56b5ab05ed9fb17fc6d08261
tree265d4d8489c91999b743e5882b0ecf95a51a8f33
parent015a5a5c5c4b4ce4dce55601032b8e2f5fbcca9a
net/http: fix data race due to writeLoop goroutine left running

Fix a data race for clients that mutate requests after receiving a
response error which is caused by the writeLoop goroutine left
running, this can be seen on cancelled requests.

Fixes #37669

Change-Id: Ia4743c6b8abde3a7503de362cc6a3782e19e7f60
Reviewed-on: https://go-review.googlesource.com/c/go/+/251858
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/transport.go
src/net/http/transport_test.go