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

allow "premature close" for non-core streams #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

isaacs
Copy link

@isaacs isaacs commented Aug 17, 2017

Fix #11

The timing of "close" events is implementation-specific. For core
streams, it's reliably possible to determine if a close event is coming
in advance of the stream actually being "done".

However, if a stream doesn't have a _readableState or _writableState
property, then it's impossible to determine if the close is "premature"
or not.

Fix mafintosh#11

The timing of "close" events is implementation-specific.  For core
streams, it's reliably possible to determine if a close event is coming
in advance of the stream actually being "done".

However, if a stream doesn't have a _readableState or _writableState
property, then it's impossible to determine if the close is "premature"
or not.
@mafintosh
Copy link
Owner

This breaks error handling for https://github.com/dominictarr/through which uses close as a "destroy" event.

Unsure how to support both patterns

@legobeat
Copy link

legobeat commented Sep 5, 2023

@mafintosh through is now archived and no longer maintained - is supporting it still a priority?

@exapsy
Copy link

exapsy commented Aug 3, 2024

This breaks error handling for https://github.com/dominictarr/through which uses close as a "destroy" event.

Unsure how to support both patterns

@mafintosh the project is archived. And this fix is a deal changer for a project im maintaining. It seems to be fixing a premature close issue. Can we look it up again please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't inspect stream._readableState.ended
5 participants