Skip to content

Commit e0b3ac1

Browse files
committed
address review comment
1 parent 5a6b48d commit e0b3ac1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/connection/buffered_connection.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export class BufferedConnection implements Connection {
1515
// BUT we must wait for the previous flush to end.
1616
this.flushing = this.flushing.then(() => this.scheduleFlush());
1717
}
18+
// we don't need to reschedule the `flush` here,
19+
// because the flush happens anyway at the end of the current event loop iteration.
1820
// tag along to the previously scheduled flush.
1921
return this.flushing;
2022
}

0 commit comments

Comments
 (0)