From a1169a3141ee9fba8115d598cc82940ce5513a3b Mon Sep 17 00:00:00 2001 From: Milo Mirate <992859+mmirate@users.noreply.github.com> Date: Mon, 30 Oct 2023 13:14:44 -0400 Subject: [PATCH] fixup Timer wasn't being reset on each send of keepalive, causing lots of keepalives to be sent rather than just one. --- russh/src/client/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/russh/src/client/mod.rs b/russh/src/client/mod.rs index c77281a1..a807a093 100644 --- a/russh/src/client/mod.rs +++ b/russh/src/client/mod.rs @@ -776,6 +776,7 @@ impl Session { while !self.common.disconnected { tokio::select! { () = &mut time_for_keepalive => { + time_for_keepalive.as_mut().reset(self.common.config.keepalive_deadline()); self.send_keepalive(true); } r = &mut reading => {