mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix dangling task for homekit (#88289)
This commit is contained in:
parent
baee6b1f5e
commit
3c68907351
@ -443,7 +443,9 @@ class Camera(HomeAccessory, PyhapCamera):
|
||||
async def stop(self):
|
||||
"""Stop any streams when the accessory is stopped."""
|
||||
for session_info in self.sessions.values():
|
||||
asyncio.create_task(self.stop_stream(session_info))
|
||||
self.hass.async_create_background_task(
|
||||
self.stop_stream(session_info), "homekit.camera-stop-stream"
|
||||
)
|
||||
await super().stop()
|
||||
|
||||
async def stop_stream(self, session_info):
|
||||
|
Loading…
x
Reference in New Issue
Block a user