mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Log to warning only in the last attempt
This commit is contained in:
parent
0302a27b7e
commit
72b7a53ff5
@ -439,9 +439,9 @@ class Session:
|
||||
if retries == 0:
|
||||
raise e from None
|
||||
|
||||
(log.warning if retries < 3 else log.info)(
|
||||
(log.warning if retries < 2 else log.info)(
|
||||
"{}: {} Retrying {}".format(
|
||||
Session.MAX_RETRIES - retries,
|
||||
Session.MAX_RETRIES - retries + 1,
|
||||
datetime.now(), type(data)))
|
||||
|
||||
time.sleep(0.5)
|
||||
|
Loading…
x
Reference in New Issue
Block a user