Skip to content

Commit

Permalink
fix: force disconnect on connection reset
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeFoodPixels committed Mar 1, 2024
1 parent 0b18494 commit c251501
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/robovac/tuyalocalapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,8 @@ async def _async_handle_message(self):
if self._connected:
_LOGGER.debug("Incomplete read")
elif isinstance(e, ConnectionResetError):
_LOGGER.debug("Connection reset")
_LOGGER.debug("Connection reset: {}".format(e))
await self.async_disconnect()

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

0 comments on commit c251501

Please sign in to comment.