-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
"write after end" error when stdout was end()-ed #9403
Comments
I think this is because |
@addaleax Just noticed that, I think re-setting the |
IMHO it is legit behavior. Maybe the error should be better/etc, but if end() is called on stderr, stderr needs to be closed. |
How is this different from #831? I am missing what are you proposing regarding destroy/destroySoon. |
@mcollina That is about making |
This is a step in making `console` safe, swallows EPIPE and other errors by registering an empty 'error' event listener. Also fixes writes to stdout/stderr not working after `end()` is called, even though we already override `destroy()` so the stream is never actually closed. Refs: nodejs#831 Fixes: nodejs#947 Fixes: nodejs#9403
This was fixed in #9470 |
master
, presumably all recent node major versionsstdout
/stderr
unexpectedly throw awrite after end
error whenend()
has been called on them, even thoughend()
throws it's own error indestroy()
/destroySoon()
overriding the usual destroy code which is innet.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:
cc @nodejs/streams
The text was updated successfully, but these errors were encountered: