disconnect if error

This commit is contained in:
2025-02-07 12:48:44 +03:00
parent 4deb9b60ec
commit 6bf68ed354

View File

@ -176,6 +176,7 @@ class BaseThon(BaseData):
async def __aenter__(self) -> str | Self:
r = await self.check()
if r != "OK":
await self.disconnect()
return r
return self