summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-22 19:33:28 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-22 19:33:28 +0100
commit6e4460ae6518b2bcdbc3dc5472a407b56772d939 (patch)
tree0eb384dcc1b1b3aebac91564b59edeb873e65f22
parentd002eff15589ffc384c8d7e8da5d7bd7e75720e4 (diff)
device: send persistent keepalive when bringing up device
Reported-by: Marcelo Bello
-rw-r--r--device.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/device.go b/device.go
index 2538648..18e1138 100644
--- a/device.go
+++ b/device.go
@@ -138,6 +138,9 @@ func deviceUpdateState(device *Device) {
device.peers.RLock()
for _, peer := range device.peers.keyMap {
peer.Start()
+ if peer.persistentKeepaliveInterval > 0 {
+ peer.SendKeepalive()
+ }
}
device.peers.RUnlock()