Skip to content

Commit

Permalink
src: Revert nix stdin _readableState.reading
Browse files Browse the repository at this point in the history
This reverts 8cee8f5 which was causing a regression through a possible
race condition on Windows 8 and 10.

Fixes: nodejs#2996
Fixes: nodejs#2504
  • Loading branch information
silverwind authored and rvagg committed Nov 7, 2015
1 parent bb1bd76 commit 093b0e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@
// not-reading state.
if (stdin._handle && stdin._handle.readStop) {
stdin._handle.reading = false;
stdin.push('');
stdin._readableState.reading = false;
stdin._handle.readStop();
}

Expand All @@ -735,7 +735,7 @@
stdin.on('pause', function() {
if (!stdin._handle)
return;
stdin.push('');
stdin._readableState.reading = false;
stdin._handle.reading = false;
stdin._handle.readStop();
});
Expand Down

0 comments on commit 093b0e8

Please sign in to comment.