Merge pull request #1723 from byehack/patch-1

don't block loop
This commit is contained in:
_run 2022-09-17 13:42:57 +04:00 committed by GitHub
commit b841fc10ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ class AsyncTeleBot:
logger.error("Infinity polling exception: %s", str(e))
if logger_level and logger_level >= logging.DEBUG:
logger.error("Exception traceback:\n%s", traceback.format_exc())
time.sleep(3)
await asyncio.sleep(3)
continue
if logger_level and logger_level >= logging.INFO:
logger.error("Infinity polling: polling exited")