mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix memory leak in ambient_station on reload (#49455)
This commit is contained in:
parent
3164eef059
commit
20ead7902a
@ -355,7 +355,11 @@ async def async_setup_entry(hass, config_entry):
|
||||
async def _async_disconnect_websocket(*_):
|
||||
await ambient.client.websocket.disconnect()
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_disconnect_websocket)
|
||||
config_entry.async_on_unload(
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_STOP, _async_disconnect_websocket
|
||||
)
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user