diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-02-25 12:28:53 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-03-06 08:44:38 -0700 |
commit | 593658d9755bd33232a49c5a8f3e54d3f59a614e (patch) | |
tree | ca46ae7543711429a0bd1ab2c8aeb5de996e45d9 /device/timers.go | |
parent | 3c11c0308e4e9fae76e1531f4f49a39f1ae24253 (diff) |
device: get rid of peers.empty boolean in timersActive
There's no way for len(peers)==0 when a current peer has
isRunning==false.
This requires some struct reshuffling so that the uint64 pointer is
aligned.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/timers.go')
-rw-r--r-- | device/timers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/device/timers.go b/device/timers.go index fa44874..ee191e5 100644 --- a/device/timers.go +++ b/device/timers.go @@ -71,7 +71,7 @@ func (timer *Timer) IsPending() bool { } func (peer *Peer) timersActive() bool { - return peer.isRunning.Get() && peer.device != nil && peer.device.isUp() && !peer.device.peers.empty.Get() + return peer.isRunning.Get() && peer.device != nil && peer.device.isUp() } func expiredRetransmitHandshake(peer *Peer) { |