-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Description
It seems that we increment retries
for every loop iteration, even if the callback succeeded and there were no errors from the TG API:
python-telegram-bot/src/telegram/ext/_utils/networkloop.py
Lines 149 to 150 in c062712
finally: | |
retries += 1 |
This conflicts with the logic of checking the number of retries done:
python-telegram-bot/src/telegram/ext/_utils/networkloop.py
Lines 131 to 135 in c062712
except TelegramError as telegram_exc: | |
if on_err_cb: | |
on_err_cb(telegram_exc) | |
if max_retries < 0 or retries < max_retries: |
It also seems that we don't reset retries = 0
when there are no errors returned.
Metadata
Metadata
Assignees
Labels
No labels