Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Readable.resume() schedules the resume operation onto the next tick, whereas pause() has immediate effect. This means that in a sequence stream.resume(); stream.pause(); .. the 'pause' event will be triggered before the resume operation is performed. For process.stdin, we are relying on the 'pause' event to stop reading on the underlying handle. This fix ensures that reads are started and stopped in the same order as resume() and pause() are called. PR-URL: nodejs#5776 Reviewed-By: cjihrig - Colin Ihrig <[email protected]> Reviewed-By: jasnell - James M Snell <[email protected]>
- Loading branch information