Fix memory leak in fritzbox (#49462)

This commit is contained in:
J. Nick Koston
2021-04-20 06:12:54 -10:00
committed by GitHub
parent c9fbdfbbbe
commit 052e935c2b

View File

@@ -96,7 +96,9 @@ async def async_setup_entry(hass, entry):
"""Close connections to this fritzbox.""" """Close connections to this fritzbox."""
fritz.logout() fritz.logout()
entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, logout_fritzbox) hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, logout_fritzbox)
)
return True return True