-
Notifications
You must be signed in to change notification settings - Fork 229
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
Conversation
nice but we have to be carefull because any other pull will likely revert it |
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.
older node is breaking
lib/_stream_writable.js
Outdated
process.nextTick(cb, er); | ||
// this can emit finish, and it will always happen | ||
// after error | ||
process.nextTick(finishMaybe, stream, 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 needs to be processNextTick
lib/_stream_writable.js
Outdated
if (sync) { | ||
// defer the callback if we are being called synchronously | ||
// to avoid piling up things on the stack | ||
process.nextTick(cb, er); |
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.
needs to be processNextTick
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? |
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. |
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