Fix memory leak in onvif (#49473)

This commit is contained in:
J. Nick Koston 2021-04-20 06:15:17 -10:00 committed by GitHub
parent e288afa7a3
commit f600649016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -93,7 +93,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
hass.config_entries.async_forward_entry_setup(entry, platform)
)
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, device.async_stop)
entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, device.async_stop)
)
return True