Skip to content

Commit 08e23eb

Browse files
silverwindrvagg
authored andcommitted
src: Revert "nix stdin _readableState.reading"
This reverts 8cee8f5 which was causing stdin to behave strangely on Windows 8 and 10. The suspected explanation for the issue is that there might be a race condition occuring when stdin._readableState.reading is set indirectly through `push('')`. PR-URL: #3490 Fixes: #2996 Fixes: #2504 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent 28474ef commit 08e23eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@
715715
// not-reading state.
716716
if (stdin._handle && stdin._handle.readStop) {
717717
stdin._handle.reading = false;
718-
stdin.push('');
718+
stdin._readableState.reading = false;
719719
stdin._handle.readStop();
720720
}
721721

@@ -724,7 +724,7 @@
724724
stdin.on('pause', function() {
725725
if (!stdin._handle)
726726
return;
727-
stdin.push('');
727+
stdin._readableState.reading = false;
728728
stdin._handle.reading = false;
729729
stdin._handle.readStop();
730730
});

0 commit comments

Comments
 (0)