diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index ec263d8f578fe5..399c27617d17c8 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