mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
stream: don't try to read more if reading
Avoid unnecessary nextTick. PR-URL: https://github.com/nodejs/node/pull/60454 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
This commit is contained in:
@@ -853,7 +853,7 @@ function emitReadable_(stream) {
|
||||
// However, if we're not ended, or reading, and the length < hwm,
|
||||
// then go ahead and try to read some more preemptively.
|
||||
function maybeReadMore(stream, state) {
|
||||
if ((state[kState] & (kReadingMore | kConstructed)) === kConstructed) {
|
||||
if ((state[kState] & (kReadingMore | kReading | kConstructed)) === kConstructed) {
|
||||
state[kState] |= kReadingMore;
|
||||
process.nextTick(maybeReadMore_, stream, state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user