Use debug message for timeout.
This commit is contained in:
@@ -383,6 +383,9 @@ class TuyaProtocol(asyncio.Protocol, ContextualLogger):
|
|||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
self.debug("Stopped heartbeat loop")
|
self.debug("Stopped heartbeat loop")
|
||||||
raise
|
raise
|
||||||
|
except asyncio.TimeoutError:
|
||||||
|
self.debug("Heartbeat failed due to timeout, disconnecting")
|
||||||
|
break
|
||||||
except Exception as ex: # pylint: disable=broad-except
|
except Exception as ex: # pylint: disable=broad-except
|
||||||
self.exception("Heartbeat failed (%s), disconnecting", ex)
|
self.exception("Heartbeat failed (%s), disconnecting", ex)
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user