Skip to content

Commit 093b0e8

Browse files
silverwindrvagg
authored andcommitted
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: nodejs#2996 Fixes: nodejs#2504
1 parent bb1bd76 commit 093b0e8

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
@@ -726,7 +726,7 @@
726726
// not-reading state.
727727
if (stdin._handle && stdin._handle.readStop) {
728728
stdin._handle.reading = false;
729-
stdin.push('');
729+
stdin._readableState.reading = false;
730730
stdin._handle.readStop();
731731
}
732732

@@ -735,7 +735,7 @@
735735
stdin.on('pause', function() {
736736
if (!stdin._handle)
737737
return;
738-
stdin.push('');
738+
stdin._readableState.reading = false;
739739
stdin._handle.reading = false;
740740
stdin._handle.readStop();
741741
});

0 commit comments

Comments
 (0)