Skip to content

Commit

Permalink
src: nix stdin _readableState.reading manipulation
Browse files Browse the repository at this point in the history
this opts for stream.push('') which has the same effect
but uses a public API.

PR-URL: #454
Reviewed-By: Fedor Indutny <[email protected]>
  • Loading branch information
chrisdickinson committed Jun 26, 2015
1 parent 7f63449 commit 8cee8f5
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 @@ -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();
}

Expand All @@ -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();
});
Expand Down

0 comments on commit 8cee8f5

Please sign in to comment.