From ce30784051e0b95a194c980e90b675afbc51d288 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 20 Oct 2026 05:16:15 +0200 Subject: take_keepalive_due: consider added_at This prevents an immediate ping during handshake. --- src/state.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/state.rs b/src/state.rs index 81663f3..a8b573b 100644 --- a/src/state.rs +++ b/src/state.rs @@ -179,6 +179,7 @@ impl PeerState { pub(crate) fn take_keepalive_due(&mut self, timing: &Timing, now: Instant) -> bool { let due = self.liveness == Liveness::Active && self.hello_state == HelloState::Established + && now.saturating_duration_since(self.added_at) >= timing.keepalive && self.quiet_for(now) >= timing.keepalive && self .last_ping_at -- cgit v1.3.1