Skip to content

Commit a8d4783

Browse files
committed
fix: don't wait for the mqtt thread to fully shutdown when disconecting
1 parent 3c30d93 commit a8d4783

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

roborock/cloud_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ async def async_disconnect(self) -> None:
158158
if disconnected_future := self._sync_disconnect():
159159
# There are no errors set on this future
160160
await disconnected_future
161-
await self.event_loop.run_in_executor(None, self._mqtt_client.loop_stop)
161+
# Stop the loop but don't wait for it to fully shutdown
162+
self.event_loop.run_in_executor(None, self._mqtt_client.loop_stop)
162163

163164
async def async_connect(self) -> None:
164165
async with self._mutex:

0 commit comments

Comments
 (0)