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: set timer to be use daemon thread #647

Merged
merged 1 commit into from
Dec 30, 2024
Merged

Conversation

silentworks
Copy link
Contributor

@silentworks silentworks commented Dec 28, 2024

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

If any sign in method is called a timer kicks off to handle token refresh, however if you should exit the program the timer gets disrupted and doesn't stop correctly because of the thread its running on.

What is the new behavior?

Timer stops correctly because it now makes use of a daemon thread.

Additional context

supabase/supabase-py#494
supabase/supabase-py#844
supabase/supabase-py#451

@silentworks silentworks requested review from grdsdev and J0 December 28, 2024 10:09
Copy link
Contributor

@J0 J0 left a comment

Choose a reason for hiding this comment

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

Makes sense, the daemon thread should be killed automatically when the program exits

@silentworks silentworks merged commit 98de380 into main Dec 30, 2024
9 checks passed
@silentworks silentworks deleted the silentworks/timer-daemon branch December 30, 2024 12:00
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