From 0619ff40db9758baddcaabdf93316e1b7603e5f2 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 5 Oct 2020 18:37:04 +0000 Subject: [PATCH] Catch SSL/TLS errors --- irclog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irclog.py b/irclog.py index 8234c98..9a51c33 100644 --- a/irclog.py +++ b/irclog.py @@ -442,7 +442,7 @@ class IRCClient: finally: if not connectionClosedEvent.is_set(): await self._protocol.quit() - except (ConnectionRefusedError, asyncio.TimeoutError) as e: + except (ConnectionRefusedError, ssl.SSLError, asyncio.TimeoutError) as e: self.logger.error(str(e)) await asyncio.wait((asyncio.sleep(5), sigintEvent.wait()), return_when = asyncio.FIRST_COMPLETED) if sigintEvent.is_set():