1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

don't block loop

This commit is contained in:
byehack 2022-09-17 13:58:28 +04:30 committed by GitHub
parent 8d9dfcfac8
commit c14760d81c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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