src: nix stdin _readableState.reading manipulation

this opts for stream.push('') which has the same effect
but uses a public API.

PR-URL: https://github.com/nodejs/io.js/pull/454
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
This commit is contained in:
Chris Dickinson 2015-01-15 12:33:54 -08:00
parent 7f63449fde
commit 8cee8f54fc

View File

@ -699,7 +699,7 @@
// not-reading state.
if (stdin._handle && stdin._handle.readStop) {
stdin._handle.reading = false;
stdin._readableState.reading = false;
stdin.push('');
stdin._handle.readStop();
}
@ -708,7 +708,7 @@
stdin.on('pause', function() {
if (!stdin._handle)
return;
stdin._readableState.reading = false;
stdin.push('');
stdin._handle.reading = false;
stdin._handle.readStop();
});