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: fix readable behavior for highWaterMark === 0 #21690

Closed
wants to merge 1 commit into from

Commits on Aug 10, 2018

  1. stream: fix readable behavior for highWaterMark === 0

    Avoid trying to emit 'readable' due to the fact that
    state.length is always >= state.highWaterMark if highWaterMark is 0.
    Therefore upon .read(0) call (through .on('readable')) stream assumed
    that it has enough data to emit 'readable' even though
    state.length === 0 instead of issuing _read(). Which led to the TTY
    not recognizing that someone is waiting for the input.
    
    Fixes: nodejs#20503
    Refs: nodejs#18372
    lundibundi committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    e5a6527 View commit details
    Browse the repository at this point in the history