Skip to content

Commit 8cee8f5

Browse files
src: nix stdin _readableState.reading manipulation
this opts for stream.push('') which has the same effect but uses a public API. PR-URL: nodejs#454 Reviewed-By: Fedor Indutny <[email protected]>
1 parent 7f63449 commit 8cee8f5

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
@@ -699,7 +699,7 @@
699699
// not-reading state.
700700
if (stdin._handle && stdin._handle.readStop) {
701701
stdin._handle.reading = false;
702-
stdin._readableState.reading = false;
702+
stdin.push('');
703703
stdin._handle.readStop();
704704
}
705705

@@ -708,7 +708,7 @@
708708
stdin.on('pause', function() {
709709
if (!stdin._handle)
710710
return;
711-
stdin._readableState.reading = false;
711+
stdin.push('');
712712
stdin._handle.reading = false;
713713
stdin._handle.readStop();
714714
});

0 commit comments

Comments
 (0)