Skip to content
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

fix(cursor): close underlying query cursor when calling destroy() #14982

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

vkarpov15
Copy link
Collaborator

Summary

Implemented using _destroy() like recommended in Node docs here: https://nodejs.org/api/stream.html#writable_destroyerr-callback because that's the preferred way to handle async cleanup in destroy(), because destroy() itself needs to be sync.

Examples

@vkarpov15 vkarpov15 added this to the 8.7.3 milestone Oct 23, 2024
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, slight question though, why set _closed to false in the destroy case?

@vkarpov15
Copy link
Collaborator Author

You're right, should set _closed to true

@vkarpov15 vkarpov15 merged commit f2b2816 into master Oct 25, 2024
61 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14966 branch October 25, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants