fix(process): remove client reference after disconnection
Remove the client reference from the ProcessThon class after disconnection to prevent potential memory leaks and ensure proper cleanup of resources. This change ensures that the client object is dereferenced and garbage collected after the disconnection process is completed.
This commit is contained in:
@ -173,6 +173,7 @@ class ProcessThon(Data):
|
||||
await self.client(UpdateStatusRequest(offline=True))
|
||||
with contextlib.suppress(Exception):
|
||||
await self.client.disconnect() # type: ignore # ty:ignore[unused-ignore-comment]
|
||||
del self.__client
|
||||
|
||||
async def __aenter__(self) -> Self | str:
|
||||
r = await self.check()
|
||||
|
||||
Reference in New Issue
Block a user