]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: don't hold lock when closing underlying net.Conn.
authorAdam Langley <agl@golang.org>
Wed, 8 Feb 2017 18:06:34 +0000 (10:06 -0800)
committerAdam Langley <agl@golang.org>
Thu, 9 Feb 2017 19:02:55 +0000 (19:02 +0000)
commitf02dda50e8b4e268987d269e22b6d7410a52587b
tree0fa562930d2feca2107e4833a6284b6c58515e29
parent695f12c21a217e0116a80c2c1a518d382cfea22e
crypto/tls: don't hold lock when closing underlying net.Conn.

There's no need to hold the handshake lock across this call and it can
lead to deadlocks if the net.Conn calls back into the tls.Conn.

Fixes #18426.

Change-Id: Ib1b2813cce385949d970f8ad2e52cfbd1390e624
Reviewed-on: https://go-review.googlesource.com/36561
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/tls/conn.go
src/crypto/tls/conn_test.go