fix(pterodactyl): actually start the topic loop
This commit is contained in:
parent
7b859e07e9
commit
c546fa597b
1 changed files with 2 additions and 3 deletions
|
@ -27,12 +27,11 @@ class Pterodactyl(commands.Cog):
|
||||||
self.websocket: Optional[websockets.WebSocketClientProtocol] = None
|
self.websocket: Optional[websockets.WebSocketClientProtocol] = None
|
||||||
self.retry_counter: int = 0
|
self.retry_counter: int = 0
|
||||||
register_config(config)
|
register_config(config)
|
||||||
|
|
||||||
async def cog_load(self) -> None:
|
|
||||||
self.retry_counter = 0
|
|
||||||
self.task = self.get_task()
|
self.task = self.get_task()
|
||||||
|
self.update_topic.start()
|
||||||
|
|
||||||
async def cog_unload(self) -> None:
|
async def cog_unload(self) -> None:
|
||||||
|
self.update_topic.cancel()
|
||||||
self.task.cancel()
|
self.task.cancel()
|
||||||
self.retry_counter = 0
|
self.retry_counter = 0
|
||||||
await self.client._session.close() # pylint: disable=protected-access
|
await self.client._session.close() # pylint: disable=protected-access
|
||||||
|
|
Loading…
Reference in a new issue