Skip to content

Commit f4c70bc

Browse files
committed
stream: don't try to read more if reading
Avoid unnecessary nextTick.
1 parent 6176222 commit f4c70bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/streams/readable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ function emitReadable_(stream) {
853853
// However, if we're not ended, or reading, and the length < hwm,
854854
// then go ahead and try to read some more preemptively.
855855
function maybeReadMore(stream, state) {
856-
if ((state[kState] & (kReadingMore | kConstructed)) === kConstructed) {
856+
if ((state[kState] & (kReadingMore | kReading | kConstructed)) === kConstructed) {
857857
state[kState] |= kReadingMore;
858858
process.nextTick(maybeReadMore_, stream, state);
859859
}

0 commit comments

Comments
 (0)