fix: force disconnect on connection reset
This commit is contained in:
parent
0b18494fb1
commit
c251501aed
|
|
@ -831,7 +831,8 @@ class TuyaDevice:
|
||||||
if self._connected:
|
if self._connected:
|
||||||
_LOGGER.debug("Incomplete read")
|
_LOGGER.debug("Incomplete read")
|
||||||
elif isinstance(e, ConnectionResetError):
|
elif isinstance(e, ConnectionResetError):
|
||||||
_LOGGER.debug("Connection reset")
|
_LOGGER.debug("Connection reset: {}".format(e))
|
||||||
|
await self.async_disconnect()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
_LOGGER.debug("Received message from {}: {}".format(self, message))
|
_LOGGER.debug("Received message from {}: {}".format(self, message))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue