Skip to content

Commit b841fc1

Browse files
Merge pull request #1723 from byehack/patch-1
don't block loop
2 parents 8d9dfcf + c14760d commit b841fc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

telebot/async_telebot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ async def infinity_polling(self, timeout: Optional[int]=20, skip_pending: Option
270270
logger.error("Infinity polling exception: %s", str(e))
271271
if logger_level and logger_level >= logging.DEBUG:
272272
logger.error("Exception traceback:\n%s", traceback.format_exc())
273-
time.sleep(3)
273+
await asyncio.sleep(3)
274274
continue
275275
if logger_level and logger_level >= logging.INFO:
276276
logger.error("Infinity polling: polling exited")

0 commit comments

Comments
 (0)