mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 06:12:08 +00:00
remove extra flushs
This commit is contained in:
@@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user