aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-19 01:52:17 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-19 02:40:22 +0200
commit5a267f0b8cc8aa712b8171f43bea36d0f5767f39 (patch)
tree85dbcac5846f58444cd1001edbe2f3dac6c0b6d8
parenttimers: clear send_keepalive timer on sending handshake response (diff)
downloadwireguard-go-5a267f0b8cc8aa712b8171f43bea36d0f5767f39.tar.xz
wireguard-go-5a267f0b8cc8aa712b8171f43bea36d0f5767f39.zip
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
-rw-r--r--timers.go3
1 files changed, 0 insertions, 3 deletions
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()
}
}