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: writable don't throw multiple callback error #30614

Closed

Conversation

ronag
Copy link
Member

@ronag ronag commented Nov 23, 2019

Align ERR_MULTIPLE_CALLBACK in Writable with the rest of error handling as well as how the error is implemented in Transform.

I've just basically copied the Transform test and made sure Writable matches it.

Throwing here is dangerous and can lead to unnecessary unhandled exception.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Align ERR_MULTIPLE_CALLBACK in Writable with the rest
of error handling as well as how the error is implemented
in Transform.
@nodejs-github-bot nodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Nov 23, 2019
@addaleax addaleax added the semver-major PRs that contain breaking changes and should be released in the next major version. label Nov 23, 2019
lib/net.js Outdated Show resolved Hide resolved
@ronag ronag force-pushed the stream-writable-err-multiple-callback branch from 80813ce to e5c3e85 Compare November 24, 2019 09:54
@lpinca
Copy link
Member

lpinca commented Nov 24, 2019

Can you fix the test filename (test-stream-writable-callback-twice copy.js)?

@ronag
Copy link
Member Author

ronag commented Nov 24, 2019

@lpinca: Yep, sorry. I'll try to be a bit more diligent.

@ronag ronag requested a review from lpinca November 24, 2019 10:21
@ronag
Copy link
Member Author

ronag commented Dec 1, 2019

@Trott: I believe this can land?

@lpinca
Copy link
Member

lpinca commented Dec 1, 2019

It needs at least one more TSC approval as it is semver-major.

cc: @nodejs/tsc

@ronag
Copy link
Member Author

ronag commented Dec 1, 2019

Ah, sorry. I thought @lpinca was TSC. My mistake.

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Dec 1, 2019

@ronag
Copy link
Member Author

ronag commented Dec 11, 2019

@Trott: This has 2 TSC approvals and should be able to land? Anything in the CITGM?

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Dec 14, 2019

CITGM looks good.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Trott pushed a commit that referenced this pull request Dec 14, 2019
Align ERR_MULTIPLE_CALLBACK in Writable with the rest
of error handling as well as how the error is implemented
in Transform.

PR-URL: #30614
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@Trott
Copy link
Member

Trott commented Dec 14, 2019

Landed in e902fad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major PRs that contain breaking changes and should be released in the next major version. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants