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>
This commit is contained in:
@@ -111,7 +111,6 @@ func (device *Device) NewPeer(pk NoisePublicKey) (*Peer, error) {
|
||||
|
||||
// add
|
||||
device.peers.keyMap[pk] = peer
|
||||
device.peers.empty.Set(false)
|
||||
|
||||
// start peer
|
||||
peer.timersInit()
|
||||
|
||||
Reference in New Issue
Block a user