mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 22:05:28 +00:00
Log to warning only in the last attempt
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user