From 0b67386e10cda0482533494f68f4de5c1f950585 Mon Sep 17 00:00:00 2001 From: Cayman Date: Thu, 10 Oct 2024 12:22:54 -0400 Subject: [PATCH] fix: only send window update when read state is ready --- src/stream.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/stream.ts b/src/stream.ts index 7e17922..f7a78f0 100644 --- a/src/stream.ts +++ b/src/stream.ts @@ -269,6 +269,11 @@ export class YamuxStream extends AbstractStream { * potentially sends a window update enabling further writes to take place. */ sendWindowUpdate (): void { + // only send window updates if the read status is ready + if (this.readStatus !== 'ready') { + return + } + // determine the flags if any const flags = this.getSendFlags()