From a8d47834c67b23cd56e50274b0e7a2ae100324bb Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sat, 25 Jan 2025 22:04:55 -0800 Subject: [PATCH] fix: don't wait for the mqtt thread to fully shutdown when disconecting --- roborock/cloud_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roborock/cloud_api.py b/roborock/cloud_api.py index f2731371..2321fe70 100644 --- a/roborock/cloud_api.py +++ b/roborock/cloud_api.py @@ -158,7 +158,8 @@ async def async_disconnect(self) -> None: if disconnected_future := self._sync_disconnect(): # There are no errors set on this future await disconnected_future - await self.event_loop.run_in_executor(None, self._mqtt_client.loop_stop) + # Stop the loop but don't wait for it to fully shutdown + self.event_loop.run_in_executor(None, self._mqtt_client.loop_stop) async def async_connect(self) -> None: async with self._mutex: