Skip to content

Commit

Permalink
fix: only send window update when read state is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Oct 10, 2024
1 parent ea3acef commit 0b67386
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 0b67386

Please sign in to comment.