Skip to content

Commit

Permalink
Fix stop in RRClient
Browse files Browse the repository at this point in the history
  • Loading branch information
tvorogme committed Feb 19, 2024
1 parent b3f9659 commit 79c52dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def finalize_options(self):

setup(
name="tonpy" if not IS_DEV else "tonpy-dev",
version="0.0.0.1.2b0" if not IS_DEV else "0.0.0.2.9b1",
version="0.0.0.1.2b0" if not IS_DEV else "0.0.0.2.9c1",
author="Disintar LLP",
author_email="andrey@head-labs.com",
description="Types / API for TON blockchain",
Expand Down
7 changes: 7 additions & 0 deletions src/tonpy/types/liteclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def check_server(self, server):

try:
client.get_time()
client.stop()
return True
except Exception as e:
return False
Expand All @@ -199,6 +200,9 @@ def rotate(self):

pubkey = PublicKey(base64_to_hex(pubkey_base64))

if self.client is not None:
self.client.stop()

self.client = PyLiteClient(
host=host,
port=port,
Expand All @@ -207,6 +211,9 @@ def rotate(self):
threads=self.threads
)

def stop(self):
self.client.stop()

def __getattr__(self, name):
func = name

Expand Down

0 comments on commit 79c52dc

Please sign in to comment.