Fix memory leak in fritzbox (#49462)

pull/49494/head
J. Nick Koston 2021-04-20 06:12:54 -10:00 committed by GitHub
parent c9fbdfbbbe
commit 052e935c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

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