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:Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
parent
cc7cec25
Please register or sign in to comment