Fix data races in timers

This commit is contained in:
Jason A. Donenfeld
2018-05-20 06:50:07 +02:00
parent 18f43705ec
commit acb5481246
4 changed files with 17 additions and 17 deletions

View File

@@ -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 {