Skip to content

Commit 02335c2

Browse files
committed
fix: stop the mqtt loop on disconnect
1 parent cc76657 commit 02335c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

roborock/cloud_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ def sync_connect(self) -> Any:
156156
async def async_disconnect(self) -> None:
157157
async with self._mutex:
158158
if disconnected_future := self.sync_disconnect():
159+
# Cleanup the mqtt client threads
160+
await self.event_loop.run_in_executor(None, self._mqtt_client.loop_stop)
159161
try:
160162
await disconnected_future
161163
except VacuumError as err:

0 commit comments

Comments
 (0)