]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: change Conn.handshakeStatus type to atomic.Bool
authorLudi Rehak <ludi317@gmail.com>
Tue, 9 Aug 2022 16:36:17 +0000 (09:36 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 11 Aug 2022 13:58:45 +0000 (13:58 +0000)
commita1337ef40cfa71625595b5b7f10b15341c1240f2
treeb7f1e20761795fad2b876ffb3f2cd363a0df5eee
parentde95dca32fb196d5f09bf5db4a6ba592907559c3
crypto/tls: change Conn.handshakeStatus type to atomic.Bool

Change the type of Conn.handshakeStatus from an atomically
accessed uint32 to an atomic.Bool. Change its name to
Conn.isHandshakeComplete to indicate it is a boolean value.
Eliminate the handshakeComplete() helper function, which checks
for equality with 1, in favor of the simpler
c.isHandshakeComplete.Load().

Change-Id: I084c83956fff266e2145847e8645372bef6ae9df
Reviewed-on: https://go-review.googlesource.com/c/go/+/422296
Auto-Submit: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
src/crypto/tls/conn.go
src/crypto/tls/handshake_client.go
src/crypto/tls/handshake_client_tls13.go
src/crypto/tls/handshake_server.go
src/crypto/tls/handshake_server_tls13.go