mirror of
https://github.com/home-assistant/core.git
synced 2025-08-11 16:45:19 +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."""
|
||||
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
|
||||
|
||||
|
Reference in New Issue
Block a user