Commit ea765eba authored by Robert Nagy's avatar Robert Nagy Committed by Rich Trott
Browse files

stream: simplify howMuchToRead()

This slightly refactors read by moving side effects out of
howMuchToRead().

We don't actually have to set state.needReadable = true; in
howMuchToRead() since read handles 0 return as needReadable.

PR-URL: https://github.com/nodejs/node/pull/29155


Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
parent cc7cec25
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment