From edfde229c77c067083407db2218265becbb15bd9 Mon Sep 17 00:00:00 2001 From: Ciro Spaciari Date: Sat, 7 Sep 2024 07:58:05 -0700 Subject: [PATCH] remove extra flushs --- src/js/node/http.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/js/node/http.ts b/src/js/node/http.ts index 7db2b91cd9..5d5b4c8c5e 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); }); };