disconnect if error
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user