From 6e05d2d49f8ce98f308a1cf3013d01f5f9ee98b0 Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Tue, 31 Dec 2024 08:42:29 -0500 Subject: [PATCH] Catch one more connection exception (#743) --- aioshelly/rpc_device/wsrpc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aioshelly/rpc_device/wsrpc.py b/aioshelly/rpc_device/wsrpc.py index 2fa02409..4113d5c4 100644 --- a/aioshelly/rpc_device/wsrpc.py +++ b/aioshelly/rpc_device/wsrpc.py @@ -354,7 +354,12 @@ async def _rx_msgs(self) -> None: self._port, err, ) - except ConnectionClosed: + except (ConnectionClosed, client_exceptions.ClientConnectionResetError): + _LOGGER.debug( + "Connection issue with device %s:%s", + self._ip_address, + self._port, + ) break except Exception: _LOGGER.exception("Unexpected error while receiving message")