Skip to content

fix: respect HTTPX client ownership during cleanup - #109

Merged
eifinger merged 2 commits into
mainfrom
fix/ha-client-ownership
Oct 1, 2026
Merged

eifinger merged 2 commits into
mainfrom
fix/ha-client-ownership

Conversation

@eifinger

@eifinger eifinger commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Leave injected HTTPX clients open when closing a WazeRouteCalculator, while still closing its owned HTTPX client and impersonating session. Preserve impersonating-session cleanup when owned HTTPX cleanup raises.

Document that consumers must await calculator cleanup after validation and on unload. This makes cleanup compatible with Home Assistant’s shared HTTPX client; it does not automatically clean up calculators that consumers never close.

Thread: https://ampcode.com/threads/T-01a0f7ee-1716-708f-95e3-e71ad595da40

Keep injected HTTPX clients open while closing calculator-owned clients
and the impersonating session. Document the consumer cleanup obligation.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0f7ee-1716-708f-95e3-e71ad595da40
Co-authored-by: Kevin Stillhammer <kevin.stillhammer@tado.com>
@eifinger
eifinger force-pushed the fix/ha-client-ownership branch from a5e6ba9 to e26e159 Compare October 1, 2026 15:02
Remove the lifecycle details requested in review.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0f7ee-1716-708f-95e3-e71ad595da40
Co-authored-by: Kevin Stillhammer <kevin.stillhammer@tado.com>
@eifinger eifinger added the bugfix Fix for an existing bug label Oct 1, 2026
@eifinger
eifinger merged commit e012080 into main Oct 1, 2026
4 checks passed
@eifinger
eifinger deleted the fix/ha-client-ownership branch October 1, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix for an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants