diff options
author | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-01-15 12:33:54 -0800 |
---|---|---|
committer | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-06-26 11:04:57 -0700 |
commit | 8cee8f54fc5fe3d340bf10ba2e9dbb5648b21b83 (patch) | |
tree | ef706fe4738a644df483d657f99ede83d14ef1f7 /src/node.js | |
parent | 7f63449fde070455b337cd4b8e094d5366eb2dd8 (diff) | |
download | node-new-8cee8f54fc5fe3d340bf10ba2e9dbb5648b21b83.tar.gz |
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>
Diffstat (limited to 'src/node.js')
-rw-r--r-- | src/node.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node.js b/src/node.js index 292c7b2213..82094cf44f 100644 --- a/src/node.js +++ b/src/node.js @@ -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(); }); |