Skip to content

Need a way to detect end of stream on custom Writable Streams implementing _write #2994

Closed
@GeorgeBailey

Description

It seems that _write should be called with null as the data, when the end of stream is reached.

The problem I am having is that I need to add additional data to the end of the stream, and the finish event should not be emitted until after that is completed. I need a way to control this, so I'm thinking a new _end function with a callback, or perhaps a callback on _write(null) would do the trick.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.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