Skip to content

Commit c251501

Browse files
fix: force disconnect on connection reset
1 parent 0b18494 commit c251501

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom_components/robovac/tuyalocalapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,8 @@ async def _async_handle_message(self):
831831
if self._connected:
832832
_LOGGER.debug("Incomplete read")
833833
elif isinstance(e, ConnectionResetError):
834-
_LOGGER.debug("Connection reset")
834+
_LOGGER.debug("Connection reset: {}".format(e))
835+
await self.async_disconnect()
835836

836837
else:
837838
_LOGGER.debug("Received message from {}: {}".format(self, message))

0 commit comments

Comments
 (0)