]> Cypherpunks repositories - gostls13.git/commit
net: synchronize calls to Close in the withTCPConnPair test helper
authorBryan C. Mills <bcmills@google.com>
Fri, 8 Sep 2023 20:39:17 +0000 (16:39 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 8 Sep 2023 20:56:46 +0000 (20:56 +0000)
commit2e7e1d2e8d96ddf2aff00feb645cfa94bc9e4786
tree849192a0313c97612c070802c9120368d9107449
parenta742ae493ff59a71131706500ce53f85477897f0
net: synchronize calls to Close in the withTCPConnPair test helper

withTCPConnPair is supposed to return only when both peer functions
have completed. However, due to the use of "defer" it was closing the
peers' connections after the synchronization point instead of before.

Fixes #62542.

Change-Id: I3e06c78984664172ff2d28b0fc582b8182f710f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/526977
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Commit-Queue: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/net/net_test.go