]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: fix a testing deadlock that occurs on a TLS protocol error
authorEric Young <eay@pobox.com>
Fri, 3 Jun 2022 02:22:50 +0000 (02:22 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 16 Apr 2025 21:07:41 +0000 (14:07 -0700)
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 <sean@liao.dev>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/crypto/tls/handshake_server_test.go

index 2c75b78eb15c0daed33e51ae2d8df27131bdc70e..9a2a378dcedaaa0cfc9848260c469e85113d4716 100644 (file)
@@ -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]