aboutsummaryrefslogtreecommitdiffstats
path: root/device/peer.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-25 12:28:53 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-03-06 08:44:38 -0700
commit593658d9755bd33232a49c5a8f3e54d3f59a614e (patch)
treeca46ae7543711429a0bd1ab2c8aeb5de996e45d9 /device/peer.go
parentconn: implement RIO for fast Windows UDP sockets (diff)
downloadwireguard-go-593658d9755bd33232a49c5a8f3e54d3f59a614e.tar.xz
wireguard-go-593658d9755bd33232a49c5a8f3e54d3f59a614e.zip
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/peer.go')
-rw-r--r--device/peer.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/device/peer.go b/device/peer.go
index 332f7bd..a063b91 100644
--- a/device/peer.go
+++ b/device/peer.go
@@ -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()