From 06479e4716cd5abe21bbdea9200e490259988eb0 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Mon, 26 Oct 2015 13:30:54 +0100 Subject: [PATCH] src: Revert nix stdin _readableState.reading This reverts 8cee8f5 which was causing a regression through a possible race condition on Windows 8 and 10. Fixes: https://github.com/nodejs/node/issues/2996 Fixes: https://github.com/nodejs/node/issues/2504 --- src/node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node.js b/src/node.js index d47a129635e25c..e8d365ac17201f 100644 --- a/src/node.js +++ b/src/node.js @@ -724,7 +724,7 @@ // not-reading state. if (stdin._handle && stdin._handle.readStop) { stdin._handle.reading = false; - stdin.push(''); + stdin._readableState.reading = false; stdin._handle.readStop(); } @@ -733,7 +733,7 @@ stdin.on('pause', function() { if (!stdin._handle) return; - stdin.push(''); + stdin._readableState.reading = false; stdin._handle.reading = false; stdin._handle.readStop(); });