src: nix stdin _readableState.reading manipulation
this opts for stream.push('') which has the same effect but uses a public API. PR-URL: https://github.com/nodejs/io.js/pull/454 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
This commit is contained in:
parent
7f63449fde
commit
8cee8f54fc
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user