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 and Eugeny committed Oct 31, 2023
1 parent 4a683d2 commit a1169a3
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 a1169a3

Please sign in to comment.