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:
2026-03-07 14:02:47 +03:00
parent 8ac6872c96
commit ccf94b57eb

View File

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