Skip to content

Commit

Permalink
remove extra flushs
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Sep 7, 2024
1 parent 84c632b commit e9cd0f5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/js/node/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,6 @@ ServerResponse.prototype._write = function (chunk, encoding, callback) {

ensureReadableStreamController.$call(this, controller => {
controller.write(chunk);
controller.flush().finally(callback);
});
};

Expand All @@ -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);
});
};

Expand Down

0 comments on commit e9cd0f5

Please sign in to comment.