mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 11:14:23 +00:00
Handling the exception when IRCd is down!
This commit is contained in:
@@ -121,8 +121,13 @@ class Irc:
|
|||||||
await self.send_response(data.splitlines())
|
await self.send_response(data.splitlines())
|
||||||
|
|
||||||
async def run(self):
|
async def run(self):
|
||||||
await self.connect()
|
try:
|
||||||
await self.listen()
|
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 #
|
# CONNEXION IRC #
|
||||||
|
|||||||
Reference in New Issue
Block a user