Skip to content

Commit

Permalink
fixed window_size overflow - fixes #101
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Dec 26, 2022
1 parent 49bf959 commit f08f749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion russh/src/channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ impl<S: From<(ChannelId, ChannelMsg)> + Send + 'static> Channel<S> {
pub async fn wait(&mut self) -> Option<ChannelMsg> {
match self.receiver.recv().await {
Some(ChannelMsg::WindowAdjusted { new_size }) => {
self.window_size += new_size;
self.window_size = new_size;
Some(ChannelMsg::WindowAdjusted { new_size })
}
Some(msg) => Some(msg),
Expand Down

0 comments on commit f08f749

Please sign in to comment.