diff --git a/dist/yura-14.4.3-py3-none-any.whl b/dist/yura-14.4.3-py3-none-any.whl new file mode 100644 index 0000000..b051d52 Binary files /dev/null and b/dist/yura-14.4.3-py3-none-any.whl differ diff --git a/dist/yura-14.4.3.tar.gz b/dist/yura-14.4.3.tar.gz new file mode 100644 index 0000000..3a9fdce Binary files /dev/null and b/dist/yura-14.4.3.tar.gz differ diff --git a/dist/yura-14.4.4-py3-none-any.whl b/dist/yura-14.4.4-py3-none-any.whl new file mode 100644 index 0000000..b122ca9 Binary files /dev/null and b/dist/yura-14.4.4-py3-none-any.whl differ diff --git a/dist/yura-14.4.4.tar.gz b/dist/yura-14.4.4.tar.gz new file mode 100644 index 0000000..4eeaa30 Binary files /dev/null and b/dist/yura-14.4.4.tar.gz differ diff --git a/dist/yura-14.4.5-py3-none-any.whl b/dist/yura-14.4.5-py3-none-any.whl new file mode 100644 index 0000000..8ea519c Binary files /dev/null and b/dist/yura-14.4.5-py3-none-any.whl differ diff --git a/dist/yura-14.4.5.tar.gz b/dist/yura-14.4.5.tar.gz new file mode 100644 index 0000000..97572a1 Binary files /dev/null and b/dist/yura-14.4.5.tar.gz differ diff --git a/setup.cfg b/setup.cfg index cbb43b7..f30ea63 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = yura -version = 14.4.4 +version = 14.4.5 description = Yura async AI client author = retoor author_email = retoor@retoor.io diff --git a/src/yura.egg-info/PKG-INFO b/src/yura.egg-info/PKG-INFO index c55103c..6a1ff73 100644 --- a/src/yura.egg-info/PKG-INFO +++ b/src/yura.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: yura -Version: 14.4.4 +Version: 14.4.5 Summary: Yura async AI client Author: retoor Author-email: retoor@retoor.io diff --git a/src/yura/client.py b/src/yura/client.py index 4bd5e68..85d3c6e 100644 --- a/src/yura/client.py +++ b/src/yura/client.py @@ -53,14 +53,14 @@ class AsyncRPCClient: return call - def close(self): + async def close(self): if self._ws: - self._ws.close() + await self._ws.close() self._ws = None def __del__(self): - self.close() - + if self._ws: + raise Exception("ASyncRPCClient destructed without closing connection properly.") class AsyncClient: @@ -92,7 +92,8 @@ class AsyncClient: async def connect(self, name): return await self.client.connect(name) - def __del__(self): + async def close(self): + await self.client.close() self.client = None