You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🚑 Fix AsyncClient initialization to avoid blocking event loop
Prevent event loop blocking caused by lazy httpx client initialization
The AsyncSignalRGBClient was previously initializing the httpx.AsyncClient
lazily during async operations, which could block the event loop when
the SSL certificates were loaded. This change ensures:
- Initialize httpx.AsyncClient immediately during constructor call
- Add client() property accessor to safely access the client instance
- Properly handle client existence checks before closing in __aexit__
- Fix code style issues and linting warnings in async implementation
- Add consistent null checks before aclose() calls in cleanup methods
This fix is particularly important when using the library in async
frameworks like Home Assistant where blocking the event loop can cause
performance issues.
0 commit comments