mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +03:00
Merge branch 'master' of github.com:JuniorJPDJ/Telethon
This commit is contained in:
commit
3fb8d7fa63
|
@ -92,6 +92,11 @@ class UserMethods:
|
||||||
self._flood_waited_requests\
|
self._flood_waited_requests\
|
||||||
[request.CONSTRUCTOR_ID] = time.time() + e.seconds
|
[request.CONSTRUCTOR_ID] = time.time() + e.seconds
|
||||||
|
|
||||||
|
# In test servers, FLOOD_WAIT_0 has been observed, and sleeping for
|
||||||
|
# such a short amount will cause retries very fast leading to issues.
|
||||||
|
if e.seconds == 0:
|
||||||
|
e.seconds = 1
|
||||||
|
|
||||||
if e.seconds <= self.flood_sleep_threshold:
|
if e.seconds <= self.flood_sleep_threshold:
|
||||||
self._log[__name__].info(*_fmt_flood(e.seconds, request))
|
self._log[__name__].info(*_fmt_flood(e.seconds, request))
|
||||||
await asyncio.sleep(e.seconds, loop=self._loop)
|
await asyncio.sleep(e.seconds, loop=self._loop)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user