diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-20 06:50:07 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-20 06:50:07 +0200 |
commit | acb5481246ea97bff64cc3eba1fa4255fc1ccd72 (patch) | |
tree | cab32a55aac483eb25e5a8c944d14e10f4610cd3 /send.go | |
parent | 18f43705ecbc8751bcf5ed05cd65cf93c36798b0 (diff) |
Fix data races in timers
Diffstat (limited to 'send.go')
-rw-r--r-- | send.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -124,7 +124,7 @@ func (peer *Peer) SendKeepalive() bool { func (peer *Peer) SendHandshakeInitiation(isRetry bool) error { if !isRetry { - peer.timers.handshakeAttempts = 0 + atomic.StoreUint32(&peer.timers.handshakeAttempts, 0) } peer.handshake.mutex.RLock() |