Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream: do not unconditionally call _read() on resume() #26965

Closed
wants to merge 1 commit into from

Commits on Mar 28, 2019

  1. 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: nodejs#26957
    addaleax committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    5c72c6d View commit details
    Browse the repository at this point in the history