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

rclone backend: fix hang on termination #55

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

ncw
Copy link
Contributor

@ncw ncw commented Sep 25, 2024

Before this change the rclone backend was creating a non daemon thread
which was hanging borgstore when it quit without closing the backend.

This patch changes the thread into a daemon thread which won't stop
the program from exiting when the thread is running.

Fixes #54

Before this change the rclone backend was creating a non daemon thread
which was hanging borgstore when it quit without closing the backend.

This patch changes the thread into a daemon thread which won't stop
the program from exiting when the thread is running.

Fixes borgbackup#54
Copy link
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

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

LGTM!

I've tested this and it fixes #54.

Not sure why though, because the repository context manager in borg closes the store, so guess it must be some other reason.

@ThomasWaldmann ThomasWaldmann merged commit 47e1554 into borgbackup:master Sep 25, 2024
7 checks passed
@ncw
Copy link
Contributor Author

ncw commented Sep 25, 2024

LGTM!

I've tested this and it fixes #54.

Great!

Not sure why though, because the repository context manager in borg closes the store, so guess it must be some other reason.

It is probably racing with the thread or something like that.

Anyway daemon should fix it as the thread does nothing important other than ensure the output pipe doesn't get blocked,

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.

rclone backend and exception handling
2 participants