Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
stream: always delay construct callback by a nextTick#46818
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
nodejs-github-bot commented Feb 24, 2023
Review requested:
|
Signed-off-by: Matteo Collina <[email protected]> Fixes: nodejs#46765
nodejs-github-bot commented Feb 24, 2023
ronag left a comment
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...
mcollina commented Feb 24, 2023
what would you recommend? |
ronag commented Feb 24, 2023
|
ronag commented Feb 24, 2023
Or: try{stream._construct(err=>{process.nextTick(onConstruct,err);});}catch(err){process.nextTick(onConstruct,err);} |
Signed-off-by: Matteo Collina <[email protected]>
nodejs-github-bot commented Feb 24, 2023
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <[email protected]>
nodejs-github-bot commented Feb 24, 2023
bnoordhuis commented Feb 25, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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? |
mcollina commented Feb 25, 2023
Good spot! I was able to remove one. |
nodejs-github-bot commented Feb 25, 2023
nodejs-github-bot commented Feb 25, 2023
nodejs-github-bot commented Feb 26, 2023
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