Skip to content

Commit 3dba25f

Browse files
authored
stream: don't try to read more if reading
Avoid unnecessary nextTick. PR-URL: #60454 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
1 parent b470ba0 commit 3dba25f

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)