Skip to content

Commit

Permalink
fix balancer timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
yungwine committed Dec 12, 2023
1 parent 7b4c410 commit 5aca6d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pytoniq/liteclient/balancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ async def execute_method(self, method_name_: str, *args, **kwargs) -> typing.Uni
s = time.time_ns()
if not peer_meth:
raise BalancerError('Unknown method for peer')

try:
resp = await peer_meth(*args, **kwargs)
self._update_average_request_time(ind, (time.time_ns() - s) // 10**6) # provide milliseconds
Expand All @@ -260,6 +259,7 @@ async def execute_method(self, method_name_: str, *args, **kwargs) -> typing.Uni
continue
finally:
self._current_req_num[ind] -= 1
raise asyncio.TimeoutError()

@staticmethod
def _get_args(locals_: dict):
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.22",
version="0.1.23",
author="Maksim Kurbatov",
author_email="[email protected]",
description="TON Blockchain SDK",
Expand Down

0 comments on commit 5aca6d8

Please sign in to comment.