Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

JPedroAmorim
Copy link

Fixes: #39030

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 14, 2021
@mscdex
Copy link
Contributor

mscdex commented Dec 14, 2021

This needs test(s).

@ronag ronag self-requested a review December 14, 2021 07:35
@mcollina mcollina added needs-citgm PRs that need a CITGM CI run. semver-major PRs that contain breaking changes and should be released in the next major version. labels Mar 15, 2022
@nodejs-github-bot
Copy link
Collaborator

@@ -671,6 +675,9 @@ function callFinal(stream, state) {
called = true;

state.pendingcb--;
if (!err && state.destroyed) {
Copy link
Contributor

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)) {
  // ...
}

Copy link
Member

@ronag ronag left a 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.

@aduh95
Copy link
Contributor

aduh95 commented Sep 8, 2022

This would need to be rebased if we still want to merge it.

@aduh95 aduh95 added the stalled Issues and PRs that are stalled. label Sep 20, 2023
@github-actions
Copy link
Contributor

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.

Copy link
Contributor

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.

@github-actions github-actions bot closed this Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. needs-citgm PRs that need a CITGM CI run. semver-major PRs that contain breaking changes and should be released in the next major version. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writable does not check if stream has been destroyed during _final and _write
6 participants