diff options
Diffstat (limited to 'src/timers.c')
-rw-r--r-- | src/timers.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timers.c b/src/timers.c index d515265..ca34e7d 100644 --- a/src/timers.c +++ b/src/timers.c @@ -90,8 +90,11 @@ static void queued_expired_zero_key_material(struct work_struct *work) static void expired_send_persistent_keepalive(unsigned long ptr) { peer_get_from_ptr(ptr); - if (likely(peer->persistent_keepalive_interval)) + if (likely(peer->persistent_keepalive_interval)) { + if (likely(peer->timers_enabled)) + del_timer(&peer->timer_send_keepalive); packet_send_keepalive(peer); + } peer_put(peer); } |