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
stream: end
cannot throw ERR_STREAM_DESTROYED after destroy
#27787
Comments
since the message is Lines 581 to 582 in 46d8af5
so do you have a use case where this behavior is wrong? |
@ahmedHusseinF i wanted point that:
In my case, It should me throw
|
Ping @nodejs/streams .. is there anything actionable here? |
Yea, this example does show a problem with the
However, since it's an optional argument it becomes very confusing wether it should be interpreting the I don't see how we can solve this. Maybe if we check |
Making |
I agree. But given the current api and docs it should be possible to send This might be looking at it a bit too strictly. Not sure if this really matters in a practical sense. But it is weird/confusing. |
There is nothing we can do for this unless we create a massive breakage in the ecosystem. I propose to close. |
Soft deprecating .end(data) is a good idea if you ask me. |
+1 for soft deprecating |
end with chunk is subtly broken in various ways which are difficult to resolve. Maintain current functionality, discourage usage through doc deprecation and close any related issues as wontfix. Fixes: nodejs#27787 Refs: nodejs#34003
In
objectMode
mode, callend
can receive null and also unable throwERR_STREAM_DESTROYED
.The text was updated successfully, but these errors were encountered: