From e7594616ddee1c8615d0d5f361da8e3a551fd0a2 Mon Sep 17 00:00:00 2001 From: SocksTheWolf <132639882+SocksTheWolf@users.noreply.github.com> Date: Fri, 24 Nov 2023 09:59:19 -0800 Subject: [PATCH] put exception wrapper around the relay recv Just to handle any potential faults that I might have missed. --- BotConnections.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BotConnections.py b/BotConnections.py index 53a6fab..e0ce4e7 100644 --- a/BotConnections.py +++ b/BotConnections.py @@ -62,8 +62,11 @@ async def TickRelay(self): if (self.ShouldStop): return - self.ListenForConnections() - self.HandleRecv() + try: + self.ListenForConnections() + self.HandleRecv() + except Exception as ex: + Logger.Log(LogLevel.Error, f"Encountered error while handling relay server {str(ex)}") def ListenForConnections(self): AcceptEvents = self.AcceptListener.select(0)