Commit 732a98a
committed
refactor: read verify_ssl from server.settings instead of server.client
Per Gemini review on PR homeassistant-ai#1128: server.client is a lazy @Property
(server.py) — accessing it for a single config bool would instantiate
the full HomeAssistantClient (httpx pool, settings re-read, log line)
on first access. server.settings is eager-initialized in the
HomeAssistantSmartMCPServer constructor and is the canonical source of
truth for verify_ssl.
Additional benefit: in OAuth deployment mode (__main__.py:868),
HomeAssistantSmartMCPServer is constructed with an OAuthProxyClient
whose __getattr__ proxies to a per-request OAuth client requiring an
authenticated request context. _restart_addon is a plain admin POST
without that context, so server.client.verify_ssl could have surfaced
as an auth error in OAuth mode. server.settings.verify_ssl sidesteps it
without depending on OAuthProxyClient's attribute-forwarding semantics.1 parent d2f5f3f commit 732a98a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | | - | |
| 794 | + | |
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
| |||
0 commit comments