From 1e72906f7ba3938801c7307c555e7f629c601f83 Mon Sep 17 00:00:00 2001 From: adator <85586985+adator85@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:05:42 +0100 Subject: [PATCH] Handling the exception when IRCd is down! --- core/irc.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/irc.py b/core/irc.py index ff19528..8d183dc 100644 --- a/core/irc.py +++ b/core/irc.py @@ -121,8 +121,13 @@ class Irc: await self.send_response(data.splitlines()) async def run(self): - await self.connect() - await self.listen() + try: + await self.connect() + await self.listen() + except asyncio.exceptions.IncompleteReadError as ie: + # When IRCd server is down + # asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes + self.ctx.Logs.critical(f"The IRCd server is no more connected! {ie}") ############################################## # CONNEXION IRC #