Skip to content

Fix "Checksum mismatch" when calling connect() multiple times #74

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

Merged
merged 5 commits into from
Apr 11, 2024

Conversation

rkistner
Copy link
Contributor

Usually, when calling connect() a second time, it closes the first connection first. However, when calling it twice in quick succession, a race condition caused both connections were opened. This typically then ends up with "Checksum mismatch" failures.

This fixes the issue by wrapping connect() in a Mutex.

This also bumps sqlite_async to v0.6.1. This includes improvements in handling of SQLITE_BUSY errors, which affected these tests.

@rkistner rkistner requested a review from DominicGBauer April 11, 2024 12:07
@rkistner rkistner merged commit f9177e3 into master Apr 11, 2024
@rkistner rkistner deleted the fix-multiple-connections branch April 11, 2024 12:33
@rkistner rkistner mentioned this pull request Apr 11, 2024
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