-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Supabase Client Requires Explicit sign_out()
to Terminate Properly
#926
Comments
sign_out()
to Terminate Properly
from typing import Optional, Dict, Any, Union From SyncClient class in SyncClient.pyclass SyncClient:
From SyncRealtimeClient in realtime-pyclass SyncRealtimeClient:
Example usage with context managerif name == "main": |
Full Disclosure, I'm currently learning. Hope the code I provided above helps. Feel free to comment with any advice etc. |
Yes I am willing to submit a PR! Please assign me this issue. |
@Diya910 no need to assign, you can just submit a PR once your PR is ready. |
Summary
The Supabase client currently requires an explicit call to
client.auth.sign_out()
for processes to terminate correctly. Without this, background WebSocket connections and other resources may remain active, leading to incomplete shutdowns and potential resource leaks.Problem Explanation:
The current behavior of the Supabase client involves establishing WebSocket connections and listening for authentication events. These processes, especially those involving real-time functionality, do not automatically terminate upon the program’s end. Explicitly calling client.auth.sign_out() is necessary to clean up these resources and ensure proper process termination.
Key points:
Given this behavior, the necessity of an explicit
client.auth.sign_out()
call should be clearly documented and potentially re-evaluated for a more intuitive shutdown process.The text was updated successfully, but these errors were encountered: