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
This commit is contained in:
Jason A. Donenfeld 2018-05-19 01:52:17 +02:00
parent 870734ab5e
commit 5a267f0b8c

View File

@ -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()
}
}