-
Notifications
You must be signed in to change notification settings - Fork 30k
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: always delay construct callback by a nextTick #46818
Conversation
Review requested:
|
Signed-off-by: Matteo Collina <[email protected]> Fixes: nodejs#46765
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.
LGTM, though jump
is a weird name...
what would you recommend? |
|
Or: try {
stream._construct(err => {
process.nextTick(onConstruct, err);
});
} catch (err) {
process.nextTick(onConstruct, err);
} |
Signed-off-by: Matteo Collina <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
Just double-checking: with this change there are now three (3) process.nextTick calls involved in a construct call: constructNT -> onConstruct -> emitConstructNT. That's intentional? |
Good spot! I was able to remove one. |
Landed in 355bcbc |
Signed-off-by: Matteo Collina <[email protected]> Fixes: #46765 PR-URL: #46818 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Signed-off-by: Matteo Collina <[email protected]> Fixes: #46765 PR-URL: #46818 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Signed-off-by: Matteo Collina <[email protected]> Fixes: #46765 PR-URL: #46818 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This change applies the same fix as nodejs/node#46818, and the original example given in #20456 works as expected. closes #20456
This change applies the same fix as nodejs/node#46818, and the original example given in #20456 works as expected. closes #20456 (cherry picked from commit bf42467)
This change applies the same fix as nodejs/node#46818, and the original example given in #20456 works as expected. closes #20456
Fixes: #46765