Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Timer wasn't being reset on each send of keepalive, causing lots of keepalives to be sent rather than just one.
  • Loading branch information
mmirate authored Oct 30, 2023
1 parent 668e64b commit dfd9695
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions russh/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit dfd9695

Please sign in to comment.