Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stream: do not unconditionally call
_read()
on resume()
`readable.resume()` calls `.read(0)`, which in turn previously set `needReadable = true`, and so a subsequent `.read()` call would call `_read()` even though enough data was already available. This can lead to elevated memory usage, because calling `_read()` when enough data is in the readable buffer means that backpressure is not being honoured. Fixes: #26957 PR-URL: #26965 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Signed-off-by: Beth Griggs <[email protected]>
- Loading branch information