diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 25235166d9fa7d..c5c30e26fdd673 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -364,7 +364,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