-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: finished on closed OutgoingMessage #34313
Conversation
@nodejs/streams |
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
finished should invoke callback on closed OutgoingMessage the same way as for regular streams. Fixes: nodejs#34301
@Trott Help. I can't get |
Does it fail for you locally with |
👍 This test is designed to highlight when we cause extra modules to be loaded during the bootstrap and make sure that we're are doing that conciously. In this case, we're now dragging in https://github.com/nodejs/node/blob/master/lib/internal/http.js during bootstrap with workers because workers uses streams. This is in turn also dragging in the internal performance binding: Line 8 in 66810a0
If loading those extra modules now when we bootstrap worker threads is acceptable, add them to the appropriate parts of the test (there's a conditional section for workers). Otherwise consider lazy loading the extra module(s) so they are only loaded if needed. |
I'm unsure how to fix this then... where do we put |
@nodejs/http |
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
Landed in a55b77d |
Could be an argument for reconsidering #33990 |
I don't think internal difficulties should motivate public APIs? |
OutgoingMessage has |
Yes? Using the internal property _state.closed? Depends on what you mean by "userland streams". You mean streams that are streamlike but not actually streams?
internal property
public property I'm not against it (I opened that PR after all) but I'm not for it either. I don't think this specific case motivates it. |
finished should invoke callback on closed OutgoingMessage the
same way as for regular streams.
Fixes: #34274
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes