Skip to content

streams: calling end while ending will never invoke callback? #28667

@ronag

Description

@ronag

Calling end() twice with callback will cause the second callback to never be invoked:

e.g. the following will fail.

writable.end(common.mustCall());
writable.end(common.mustCall());

I'm not sure what the behavior should be here. Maybe calling the callback with an error? Either way, not calling the callback at all seems to me like it will cause problems and memory leaks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions