From 9e15730af99a503651704029194edf1a2ced265d Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 29 Feb 2024 22:06:59 -0500 Subject: [PATCH] fix(pterodactyl): cancel the task upon error --- pterodactyl/pterodactyl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index e604ed7..50c4145 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -172,6 +172,7 @@ class Pterodactyl(commands.Cog): pass except Exception as e: self.logger.error("WebSocket task has failed: %s", e, exc_info=e) + self.task.cancel() self.task = self.get_task() async def cog_load(self):