-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
http: allow passing callbacks for [Incoming,Outgoing]Message#destroy #33907
Conversation
I think we wanted to remove the callback from public cc: @nodejs/streams @ronag |
Yup. This is an undocumented API we would like to remove. You should do the following instead: x.destroy(er)
finished(er, cb) |
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
If we can backport this to 12 it would be good. It would fix #28236 which is already fixed on 14+ but that was through a semver-major change. |
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.
We moved away from using the internal only, undocumented destroy(err, cb)
api. This moves in the opposite direction and makes the api public.
I agree, but it does fix a bug in v12 which would otherwise require a semver major change. EDIT: I guess that could be fixed in a non semver-major way that does not require this PR... if a bit hackish. |
I would rather keep the bug than exposing an internal only, soon to be removed, api as public. |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |
Fixes: #28236
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes