From: Eric Young Date: Fri, 3 Jun 2022 02:22:50 +0000 (+0000) Subject: crypto/tls: fix a testing deadlock that occurs on a TLS protocol error X-Git-Tag: go1.25rc1~458 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5ab9d9660412be2887ae5adba6198f029bcbb4a9;p=gostls13.git crypto/tls: fix a testing deadlock that occurs on a TLS protocol error A Go routine was, on an error, returning without sending a message on its signaling channel, so the main program was blocking forever waiting for a message that was never sent. Found while breaking crypto/tls. Change-Id: Id0b3c070a27cabd852f74e86bb9eff5c66b86d28 GitHub-Last-Rev: 4d84fb8b556589ec98eba6142a553fbd45683b96 GitHub-Pull-Request: golang/go#53216 Reviewed-on: https://go-review.googlesource.com/c/go/+/410274 Auto-Submit: Sean Liao Reviewed-by: Roland Shoemaker Reviewed-by: Dmitri Shuralyov Reviewed-by: Sean Liao LUCI-TryBot-Result: Go LUCI --- diff --git a/src/crypto/tls/handshake_server_test.go b/src/crypto/tls/handshake_server_test.go index 2c75b78eb1..9a2a378dce 100644 --- a/src/crypto/tls/handshake_server_test.go +++ b/src/crypto/tls/handshake_server_test.go @@ -236,7 +236,6 @@ func TestRenegotiationExtension(t *testing.T) { n, err := c.Read(buf) if err != nil { t.Errorf("Server read returned error: %s", err) - return } c.Close() bufChan <- buf[:n]