Skip to content

Commit 1f3a306

Browse files
committed
fix: keep server write window in sync after replay
1 parent 8e75aae commit 1f3a306

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

russh/src/server/encrypted.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,9 @@ impl Session {
683683
}
684684
let common = &mut self.common;
685685
if let Some(enc) = common.encrypted.as_mut() {
686-
enc.flush_pending_with_writer(&mut common.packet_writer, channel_num)?;
686+
new_size -= enc
687+
.flush_pending_with_writer(&mut common.packet_writer, channel_num)?
688+
as u32;
687689
}
688690
if let Some(chan) = self.channels.get(&channel_num) {
689691
chan.window_size().update(new_size).await;

0 commit comments

Comments
 (0)