Skip to content

Commit 21a9e5b

Browse files
allenporterCopilot
andauthored
fix: Update roborock/devices/device.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 723ae10 commit 21a9e5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

roborock/devices/device.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ async def close(self) -> None:
148148
"""Close all connections to the device."""
149149
if self._connect_task:
150150
self._connect_task.cancel()
151+
try:
152+
await self._connect_task
153+
except asyncio.CancelledError:
154+
pass
151155
if self._unsub:
152156
self._unsub()
153157
self._unsub = None

0 commit comments

Comments
 (0)