aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2026-01-24 13:03:14 -0500
committerGopher Robot <gobot@golang.org>2026-02-06 14:53:30 -0800
commitcbb37e310e2edd7148c8501567e190746e6d98d2 (patch)
treec74a8112ecca81e4f6651f56dcdf5e9d1e0ae718 /src/cmd
parentd1ec0ecec956eb10c3daf40160193daf407c7614 (diff)
downloadgo-cbb37e310e2edd7148c8501567e190746e6d98d2.tar.xz
net/http: fix WaitGroup race in TestTransportNoReuseAfterEarlyResponse
The remaining race reported in go.dev/issue/66519 is that it's possible for copying.Wait to start running before all copying.Add calls complete. It happens infrequently as is, but padding both Wait and Add calls with a 100 ms sleep makes it highly reproducible. Arranging the Add call to happen before responding "foo" to the POST request should be enough to guarantee that Wait doesn't start running until all Add calls have already happened. While here, delete a blank line that gets more in the way of reading error handling code than it helps. For #64252. Fixes #66519 (optimistically). Change-Id: Ibf264d8cc5ffc2495e8ae8e66a15591310c65e71 Reviewed-on: https://go-review.googlesource.com/c/go/+/739060 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/cmd')
0 files changed, 0 insertions, 0 deletions