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: readable error emitted #29009

Closed
wants to merge 2 commits into from

Conversation

ronag
Copy link
Member

@ronag ronag commented Aug 6, 2019

Track whether error has been emitted on readable as well. This will allow some minor refactoring and optimisations on stream helpers.

Depends/Based on: #28709.

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

@nodejs-github-bot nodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Aug 6, 2019
@ronag
Copy link
Member Author

ronag commented Aug 6, 2019

Still need to consider what/how to test here.

@ronag ronag mentioned this pull request Aug 6, 2019
7 tasks
@ronag ronag force-pushed the stream-readable-error-emitted branch from f86dba6 to 43093f5 Compare August 6, 2019 13:58
@jasnell jasnell requested a review from mcollina August 7, 2019 00:56
@@ -428,13 +428,11 @@ function onwriteError(stream, state, sync, er, cb) {
// This can emit finish, and it will always happen
// after error
process.nextTick(finishMaybe, stream, state);
stream._writableState.errorEmitted = true;
Copy link
Member

Choose a reason for hiding this comment

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

As said in one of other PRs, these should be kept.

Copy link
Member Author

Choose a reason for hiding this comment

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

This change should not be here at all. Error from my side.

@mcollina mcollina added the semver-major PRs that contain breaking changes and should be released in the next major version. label Aug 7, 2019
@mcollina
Copy link
Member

mcollina commented Aug 7, 2019

Can you please avoid piling up commits from other PRs? Either open a "big" PR with multiple commits, or wait before the previous has landed.

Also, this needs a unit test.

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.

This should not land until the previous one has landed.

@ronag ronag force-pushed the stream-readable-error-emitted branch from 43093f5 to bb2a821 Compare August 7, 2019 10:00
@ronag
Copy link
Member Author

ronag commented Aug 9, 2019

replaced by #29058

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.

None yet

3 participants