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: pipeline should only destroy un-finished streams. #32968

Closed
wants to merge 4 commits into from

Commits on Apr 21, 2020

  1. stream: pipeline should only destroy un-finished streams.

    This PR logically reverts nodejs#31940 which
    has caused lots of unnecessary breakage in the ecosystem.
    
    This PR also aligns better with the actual documented behavior:
    
    `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
      * `Readable` streams which have emitted `'end'` or `'close'`.
      * `Writable` streams which have emitted `'finish'` or `'close'`.
    
    The behavior introduced in nodejs#31940
    was much more aggressive in terms of destroying streams. This was
    good for avoiding potential resources leaks however breaks some
    common assumputions in legacy streams.
    
    Furthermore, it makes the code simpler and removes some hacks.
    
    Fixes: nodejs#32954
    Fixes: nodejs#32955
    ronag committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    3fadeba View commit details
    Browse the repository at this point in the history
  2. fixup: test

    ronag committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    04b1e3d View commit details
    Browse the repository at this point in the history
  3. fixup: simplify

    ronag committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    6b92c99 View commit details
    Browse the repository at this point in the history
  4. fixup: unnecessary once

    ronag committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    76906a5 View commit details
    Browse the repository at this point in the history