summaryrefslogtreecommitdiffstats
path: root/src/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs1
1 files changed, 1 insertions, 0 deletions
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