We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6e4788 commit 0b81208Copy full SHA for 0b81208
1 file changed
src/common/input/WriteBuffer.ts
@@ -105,7 +105,7 @@ export class WriteBuffer {
105
// schedule chunk processing for next event loop run
106
if (!this._writeBuffer.length) {
107
this._bufferOffset = 0;
108
- setTimeout(() => this._innerWrite());
+ queueMicrotask(() => this._innerWrite());
109
}
110
111
this._pendingData += data.length;
@@ -217,7 +217,7 @@ export class WriteBuffer {
217
this._callbacks = this._callbacks.slice(this._bufferOffset);
218
219
220
221
} else {
222
this._writeBuffer.length = 0;
223
this._callbacks.length = 0;
0 commit comments