Skip to content

Commit

Permalink
stream: inline unbuffered _write
Browse files Browse the repository at this point in the history
PR-URL: #32886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
ronag authored and BridgeAR committed Apr 28, 2020
1 parent 43adbe6 commit b36eb75
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,12 @@ function writeOrBuffer(stream, state, chunk, encoding, cb) {
}
state.bufferedRequestCount += 1;
} else {
doWrite(stream, state, false, len, chunk, encoding, cb);
state.writelen = len;
state.writecb = cb;
state.writing = true;
state.sync = true;
stream._write(chunk, encoding, state.onwrite);
state.sync = false;
}

// Return false if errored or destroyed in order to break
Expand Down

0 comments on commit b36eb75

Please sign in to comment.