Skip to content

Commit

Permalink
Revert "stream: emit 'pause' on nextTick"
Browse files Browse the repository at this point in the history
This reverts commit ace1009.

The offending commit broke certain usages of piping from stdin.

Fixes: #5927
PR-URL: #5947
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
evanlucas committed Mar 29, 2016
1 parent c7138e9 commit 89abe86
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/_stream_readable.js
Expand Up @@ -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;
};
Expand Down

0 comments on commit 89abe86

Please sign in to comment.