-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: throw error if stream has been destroyed on _final and _write #41164
Conversation
Review requested:
|
6df81c4
to
5e20d05
Compare
This needs test(s). |
@@ -671,6 +675,9 @@ function callFinal(stream, state) { | |||
called = true; | |||
|
|||
state.pendingcb--; | |||
if (!err && state.destroyed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could move this into the if-else block below to make it a bit cleaner:
if (err) {
// ...
} else if (state.destroyed) {
// ...
} else if (needFinish(state)) {
// ...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong to me but I don't have time to provide proper feedback atm.
This would need to be rebased if we still want to merge it. |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Closing this because it has stalled. Feel free to reopen if this issue/PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |
Fixes: #39030