diff --git a/src/js/node/http.ts b/src/js/node/http.ts index 7db2b91cd9a0ba..5d5b4c8c5e841c 100644 --- a/src/js/node/http.ts +++ b/src/js/node/http.ts @@ -1295,7 +1295,6 @@ ServerResponse.prototype._write = function (chunk, encoding, callback) { ensureReadableStreamController.$call(this, controller => { controller.write(chunk); - controller.flush().finally(callback); }); }; @@ -1310,12 +1309,10 @@ ServerResponse.prototype._writev = function (chunks, callback) { return; } - ensureReadableStreamController.$call(this, async controller => { + ensureReadableStreamController.$call(this, controller => { for (const chunk of chunks) { controller.write(chunk.chunk); } - - controller.flush().finally(callback); }); };