Skip to content

Commit 14cf80b

Browse files
chrisdickinsonmscdex
authored andcommitted
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 <fedor.indutny@gmail.com>
1 parent 898cc1e commit 14cf80b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@
698698
// not-reading state.
699699
if (stdin._handle && stdin._handle.readStop) {
700700
stdin._handle.reading = false;
701-
stdin._readableState.reading = false;
701+
stdin.push('');
702702
stdin._handle.readStop();
703703
}
704704

@@ -707,7 +707,7 @@
707707
stdin.on('pause', function() {
708708
if (!stdin._handle)
709709
return;
710-
stdin._readableState.reading = false;
710+
stdin.push('');
711711
stdin._handle.reading = false;
712712
stdin._handle.readStop();
713713
});

0 commit comments

Comments
 (0)