Fix dangling task for roon (#88291)

This commit is contained in:
Paulus Schoutsen 2023-02-17 10:42:45 -05:00 committed by GitHub
parent 9a5f88f55f
commit a223b30924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,9 @@ class RoonServer:
)
# Initialize Roon background polling
asyncio.create_task(self.async_do_loop())
self.config_entry.async_on_unload(
asyncio.create_task(self.async_do_loop()).cancel
)
return True