Skip to content

check for closed connection in changes #251

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 2 commits into from
Jun 4, 2023
Merged

check for closed connection in changes #251

merged 2 commits into from
Jun 4, 2023

Conversation

mwhitworth
Copy link
Contributor

Without this, it's possible to have a race condition where a crash happens if an insert query times out; the connection is closed during the transaction_status, changes follow-up

(Keen for feedback if this principle/check should be extended to any other NIF wrappers)

Copy link
Member

@warmwaffles warmwaffles left a comment

Choose a reason for hiding this comment

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

I've been needing to add this check in more places in the NIF code

@mwhitworth mwhitworth requested a review from warmwaffles June 4, 2023 15:41
@warmwaffles warmwaffles merged commit d0e4ec8 into elixir-sqlite:main Jun 4, 2023
@mwhitworth mwhitworth deleted the db-null-check-changes branch June 9, 2023 13:25
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