fix(pterodactyl): cancel the task upon error

This commit is contained in:
SeaswimmerTheFsh 2024-02-29 22:06:59 -05:00
parent de5d0194c8
commit 9e15730af9
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -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):