Skip to content

Commit

Permalink
improve LiteClient closing
Browse files Browse the repository at this point in the history
  • Loading branch information
yungwine committed Oct 27, 2023
1 parent b4cd3c2 commit 96cfd6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pytoniq/liteclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ async def close(self) -> None:
for i in asyncio.all_tasks(self.loop):
if i.get_name() in {self.listener_name, self.pinger_name, self.updater_name}:
i.cancel()
self.inited = False
self.tasks = {}
self.writer.close()
self.reader = None
self.writer = None
self.logger.info(msg='client has been closed')

def handshake(self) -> bytes:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pytoniq",
version="0.1.9",
version="0.1.10",
author="Maksim Kurbatov",
author_email="[email protected]",
description="TON Blockchain SDK",
Expand Down

0 comments on commit 96cfd6f

Please sign in to comment.