mirror of
https://github.com/home-assistant/core.git
synced 2025-08-12 00:55:26 +02:00
Fix memory leak in freebox (#49463)
This commit is contained in:
@@ -61,7 +61,9 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
|||||||
"""Close Freebox connection on HA Stop."""
|
"""Close Freebox connection on HA Stop."""
|
||||||
await router.close()
|
await router.close()
|
||||||
|
|
||||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, async_close_connection)
|
entry.async_on_unload(
|
||||||
|
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, async_close_connection)
|
||||||
|
)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user