Skip to content

"write after end" error when stdout was end()-ed #9403

Closed
@Fishrock123

Description

@Fishrock123
  • Version: master, presumably all recent node major versions
  • Platform: OS X 10.10.5
  • Subsystem: process/console

stdout/stderr unexpectedly throw a write after end error when end() has been called on them, even though end() throws it's own error in destroy()/destroySoon() overriding the usual destroy code which is in net.Socket. Since it overrides the destroy code, I don't think it should ever actually destroy the stream, which the error seems to indicate, but it appears to destroy it nonetheless.

Try in the REPL:

process.stderr.end('foo')
// throws error, REPL catches it

console.error('hello?')
// Unexpectedly throws "write after end"

cc @nodejs/streams

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.processIssues and PRs related to the process subsystem.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