diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 100a9c8bdfc4cd..ed3eac4132af1c 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -589,7 +589,7 @@ Writable.prototype.end = function(chunk, encoding, cb) { if (err || state.finished) process.nextTick(cb, err); else - onFinished(this, state, cb); + onFinished(this, cb); } return this; @@ -677,7 +677,7 @@ function finish(stream, state) { } // TODO(ronag): Avoid using events to implement internal logic. -function onFinished(stream, state, cb) { +function onFinished(stream, cb) { function onerror(err) { stream.removeListener('finish', onfinish); stream.removeListener('error', onerror);