From: Jason A. Donenfeld Date: Fri, 18 May 2018 23:52:17 +0000 (+0200) Subject: timers: no need to clear keepalive in persistent keepalive X-Git-Tag: 0.0.20180519~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a267f0b8cc8aa712b8171f43bea36d0f5767f39;p=thirdparty%2Fwireguard-go.git timers: no need to clear keepalive in persistent keepalive We do this after sending the keepalive anyway. This is something of a regression, though, since before we'd cancel and then send, but now we send and then cancel, so it introduces a potential race, but hopefully that isn't too big of a deal. Kernel module commit a24b3e6e15ae1ea1291666e5da910caf43eedbaf --- diff --git a/timers.go b/timers.go index 75087cb..ae206cd 100644 --- a/timers.go +++ b/timers.go @@ -134,9 +134,6 @@ func expiredZeroKeyMaterial(peer *Peer) { func expiredPersistentKeepalive(peer *Peer) { if peer.persistentKeepaliveInterval > 0 { - if peer.timersActive() { - peer.timers.sendKeepalive.Del() - } peer.SendKeepalive() } }