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

Forward-port of nodejs#13850 #298

Merged
merged 1 commit into from
Jun 22, 2017
Merged

Forward-port of nodejs#13850 #298

merged 1 commit into from
Jun 22, 2017

Conversation

mcollina
Copy link
Member

So, here is the forward-port of that PR. It will likely be part of Node 8.1.3, which will likely be released next week. I'm not sure if it's worth porting it forward here.

nodejs/node#13850

cc @phated

@calvinmetcalf
Copy link
Contributor

nice but we have to be carefull because any other pull will likely revert it

Copy link
Contributor

@calvinmetcalf calvinmetcalf left a comment

Choose a reason for hiding this comment

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

older node is breaking

process.nextTick(cb, er);
// this can emit finish, and it will always happen
// after error
process.nextTick(finishMaybe, stream, state);
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to be processNextTick

if (sync) {
// defer the callback if we are being called synchronously
// to avoid piling up things on the stack
process.nextTick(cb, er);
Copy link
Contributor

Choose a reason for hiding this comment

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

needs to be processNextTick

@mafintosh
Copy link
Member

lgtm, other than the other comments, with the caveats that i'm 100% up to date with the new mechanics.

Are there any guarantees now about close firing before after finish etc?

@mcollina
Copy link
Member Author

Are there any guarantees now about close firing before after finish etc?

I have no idea. I think the two things are loosely correlated in duplexes. Given the rate of unexpected breakage, I think we have poor coverage of the state machine and the ecosystem.
However, let's tackle one regression at a time :/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants