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(js): ensure scan is freed after fetchAll #108

Merged
merged 3 commits into from
Mar 7, 2023

Conversation

genaris
Copy link
Contributor

@genaris genaris commented Mar 4, 2023

When using Scan.fetchAll I found that the scan handle was not always properly freed. It turns out that this had to do with an error thrown when calling scanNext due to no records have been found (related issue #77), which prevented the code from executing the scanFree call.

So here we simply add a try-finally to make sure it is always being called.

Signed-off-by: Ariel Gentile <gentilester@gmail.com>
@TimoGlastra
Copy link
Contributor

We have fixed the error being thrown when no record being found (in a local branch), but this fix is good either way

@TimoGlastra TimoGlastra merged commit 15a748a into openwallet-foundation:main Mar 7, 2023
@genaris genaris deleted the fix/js-scan-free branch March 7, 2023 16:16
jamshale pushed a commit to jamshale/askar that referenced this pull request Aug 18, 2024
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
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