]> Cypherpunks repositories - gostls13.git/commit
net: avoid darwin/arm64 platform bug in TestCloseWrite
authorBryan C. Mills <bcmills@google.com>
Mon, 27 Jun 2022 17:58:55 +0000 (13:58 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 27 Jun 2022 18:18:08 +0000 (18:18 +0000)
commita42573c2f1d6a806439ec0cf65ace0508a37747f
tree6cf053489f2a9b714a125a35d94d9aea05157785
parent68289f39f0019ff5c03e047d68e5b7f6a9f9e9e2
net: avoid darwin/arm64 platform bug in TestCloseWrite

On darwin_arm64, reading from a socket at the same time as the other
end is closing it will occasionally hang for 60 seconds before
returning ECONNRESET. (This is a macOS issue, not a Go issue.)

Work around this condition by adding a brief sleep before the read.

Fixes #49352 (we hope).
Updates #37795.

Change-Id: I4052aec21d311d7370550aea9dd7941f39141133
Reviewed-on: https://go-review.googlesource.com/c/go/+/414534
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/net/net_test.go