From d779dcacdfef1ba6f6208c46c8d9defb2f525eca Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 19 May 2018 01:37:58 +0200 Subject: 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 --- src/timers.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/timers.c') 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); } -- cgit v1.2.3