mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Log the reason why a query ought to be re-tried
This commit is contained in:
parent
7a2bddc301
commit
4b914662ef
1 changed files with 3 additions and 4 deletions
|
|
@ -26,11 +26,10 @@ from os import urandom
|
|||
from queue import Queue
|
||||
from threading import Event, Thread
|
||||
|
||||
from pyrogram.api.all import layer
|
||||
|
||||
import pyrogram
|
||||
from pyrogram import __copyright__, __license__, __version__
|
||||
from pyrogram.api import functions, types, core
|
||||
from pyrogram.api.all import layer
|
||||
from pyrogram.api.core import Message, TLObject, MsgContainer, Long, FutureSalt, Int
|
||||
from pyrogram.connection import Connection
|
||||
from pyrogram.crypto import AES, KDF
|
||||
|
|
@ -440,9 +439,9 @@ class Session:
|
|||
raise e from None
|
||||
|
||||
(log.warning if retries < 2 else log.info)(
|
||||
"{}: {} Retrying {}".format(
|
||||
"[{}] Retrying {} due to {}".format(
|
||||
Session.MAX_RETRIES - retries + 1,
|
||||
datetime.now(), type(data)))
|
||||
data.QUALNAME, e))
|
||||
|
||||
time.sleep(0.5)
|
||||
return self.send(data, retries - 1, timeout)
|
||||
|
|
|
|||
Loading…
Reference in a new issue