aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-20 06:50:07 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-20 06:50:07 +0200
commitacb5481246ea97bff64cc3eba1fa4255fc1ccd72 (patch)
treecab32a55aac483eb25e5a8c944d14e10f4610cd3 /peer.go
parentFix race with closing event channel (diff)
downloadwireguard-go-acb5481246ea97bff64cc3eba1fa4255fc1ccd72.tar.xz
wireguard-go-acb5481246ea97bff64cc3eba1fa4255fc1ccd72.zip
Fix data races in timers
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/peer.go b/peer.go
index 4d3ac2b..172676a 100644
--- a/peer.go
+++ b/peer.go
@@ -40,9 +40,9 @@ type Peer struct {
newHandshake *Timer
zeroKeyMaterial *Timer
persistentKeepalive *Timer
- handshakeAttempts uint
- needAnotherKeepalive bool
- sentLastMinuteHandshake bool
+ handshakeAttempts uint32
+ needAnotherKeepalive AtomicBool
+ sentLastMinuteHandshake AtomicBool
}
signals struct {