From 8cee8f54fc5fe3d340bf10ba2e9dbb5648b21b83 Mon Sep 17 00:00:00 2001 From: Chris Dickinson Date: Thu, 15 Jan 2015 12:33:54 -0800 Subject: [PATCH] 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 --- src/node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node.js b/src/node.js index 292c7b22133ee6..82094cf44fb983 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(); });