Skip to content

Commit

Permalink
allow cancelled error to bubble up, fixes toncenter#48
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgull committed Dec 15, 2023
1 parent 9c6d7d9 commit 7ec6c7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pytonlib/tonlibjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ async def read_results(self):
result = None
try:
result = await asyncio.wait_for(self.loop.run_in_executor(None, receive_func), timeout=timeout + delta)
except asyncio.CancelledError:
raise
except asyncio.TimeoutError:
logger.critical(f"Tonlib #{self.ls_index:03d} stuck (timeout error)")
self._state = "stuck"
Expand Down

0 comments on commit 7ec6c7a

Please sign in to comment.