summaryrefslogtreecommitdiffhomepage
path: root/src/timers.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-19 01:37:58 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-19 01:51:24 +0200
commitd779dcacdfef1ba6f6208c46c8d9defb2f525eca (patch)
tree7ec97591cda779a30acd15633cd6a8a638b79e4f /src/timers.c
parent616d244def82128efd21c4c1b49112733b86f199 (diff)
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. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/timers.c')
-rw-r--r--src/timers.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/timers.c b/src/timers.c
index bd22bf6..d3150de 100644
--- a/src/timers.c
+++ b/src/timers.c
@@ -103,11 +103,8 @@ static void expired_send_persistent_keepalive(struct timer_list *timer)
{
peer_get_from_timer(timer_persistent_keepalive);
- if (likely(peer->persistent_keepalive_interval)) {
- if (likely(timers_active(peer)))
- del_timer(&peer->timer_send_keepalive);
+ if (likely(peer->persistent_keepalive_interval))
packet_send_keepalive(peer);
- }
peer_put(peer);
}