diff --git a/basethon/base_thon.py b/basethon/base_thon.py index 768353f..bdfb763 100644 --- a/basethon/base_thon.py +++ b/basethon/base_thon.py @@ -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