diff --git a/russh/src/channels.rs b/russh/src/channels.rs index cb69eafc..186b302d 100644 --- a/russh/src/channels.rs +++ b/russh/src/channels.rs @@ -347,7 +347,7 @@ impl + Send + 'static> Channel { pub async fn wait(&mut self) -> Option { 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),