Skip to content

Commit 5ad397b

Browse files
fix: disconnect on timeout so next command can work
1 parent f5042df commit 5ad397b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

roborock/local_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ async def send_message(self, data: bytes):
167167
async with async_timeout.timeout(self.timeout):
168168
await self.loop.sock_sendall(self.socket, data)
169169
except (asyncio.TimeoutError, asyncio.CancelledError):
170+
await self.disconnect()
170171
raise RoborockTimeout(
171172
f"Timeout after {self.timeout} seconds waiting for response"
172173
) from None

0 commit comments

Comments
 (0)