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

Allow giving context to database close #520

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

hifi
Copy link
Collaborator

@hifi hifi commented Nov 12, 2023

When using Litestream as a library, closing a database might not be desired to block forever due to replicas being stuck.

This moves the inner background context to an argument to allow the caller to limit the stop by using a cancelable context.

The caller can use a context with timeout to prevent closing
getting stuck on final sync.
@benbjohnson benbjohnson merged commit ae4c991 into benbjohnson:main Nov 14, 2023
1 check failed
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