We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1012c46 commit 7b8b011Copy full SHA for 7b8b011
roborock/devices/local_channel.py
@@ -155,7 +155,12 @@ async def connect(self) -> None:
155
raise RoborockConnectionException(f"Failed to connect to {self._host}:{_PORT}") from e
156
157
# Perform protocol negotiation
158
- await self._hello()
+ try:
159
+ await self._hello()
160
+ except Exception:
161
+ # If protocol negotiation fails, clean up the connection state
162
+ self.close()
163
+ raise
164
165
def close(self) -> None:
166
"""Disconnect from the device."""
0 commit comments