Fix memory leak in logi_circle (#49458)

This commit is contained in:
J. Nick Koston 2021-04-20 06:12:21 -10:00 committed by GitHub
parent 3cbfa36397
commit 11281e1cdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,7 +220,9 @@ async def async_setup_entry(hass, entry):
"""Close Logi Circle aiohttp session.""" """Close Logi Circle aiohttp session."""
await logi_circle.auth_provider.close() await logi_circle.auth_provider.close()
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shut_down) entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shut_down)
)
return True return True