Browse Source

Revert "stream: emit 'pause' on nextTick"

This reverts commit ace1009456.

The offending commit broke certain usages of piping from stdin.

Fixes: https://github.com/nodejs/node/issues/5927
PR-URL: https://github.com/nodejs/node/pull/5947
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
process-exit-stdio-flushing
Evan Lucas 9 years ago
parent
commit
89abe86808
  1. 3
      lib/_stream_readable.js

3
lib/_stream_readable.js

@ -738,8 +738,7 @@ Readable.prototype.pause = function() {
if (false !== this._readableState.flowing) {
debug('pause');
this._readableState.flowing = false;
// Emit 'pause' on next tick as we do for 'resume'
process.nextTick(() => this.emit('pause'));
this.emit('pause');
}
return this;
};

Loading…
Cancel
Save