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 timing relative to promises #51070

Closed
wants to merge 1 commit into from

Commits on Dec 14, 2023

  1. stream: fix timing relative to promises

    Workaround for Node "bug". If the stream is destroyed in same
    tick as it is created, then a user who is waiting for a
    promise (i.e micro tick) for installing a 'error' listener will
    never get a chance and will always encounter an unhandled exception.
    - tick => process.nextTick(fn)
    - micro tick => queueMicrotask(fn)
    
    PR-URL: nodejs#51070
    ronag committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    bba03f4 View commit details
    Browse the repository at this point in the history