From 7e29977e40733c9074049e3e6abcc36a16296d3c Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 15 Feb 2021 08:35:11 +0000 Subject: [PATCH] Catch connection resets and other connection errors --- irclog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irclog.py b/irclog.py index 1f483aa..5578f5f 100644 --- a/irclog.py +++ b/irclog.py @@ -733,7 +733,7 @@ class IRCClient: pass self._transport = None self._protocol = None - except (ConnectionRefusedError, ssl.SSLError, asyncio.TimeoutError, asyncio.CancelledError) as e: + except (ConnectionError, ssl.SSLError, asyncio.TimeoutError, asyncio.CancelledError) as e: self.logger.error(f'{type(e).__module__}.{type(e).__name__}: {e!s}') await wait_cancel_pending({asyncio.create_task(sigintEvent.wait())}, timeout = 5) if sigintEvent.is_set():