Skip to content

Incorrect behaviour of retries in network_retry_loop #4871

@harshil21

Description

@harshil21

It seems that we increment retries for every loop iteration, even if the callback succeeded and there were no errors from the TG API:

finally:
retries += 1

This conflicts with the logic of checking the number of retries done:

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
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy