mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
fix(client): add FloodWait exception to media download
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
a7859ba790
commit
4b8fceecdc
1 changed files with 5 additions and 0 deletions
|
|
@ -840,6 +840,9 @@ class Client(Methods):
|
|||
if isinstance(e, asyncio.CancelledError):
|
||||
raise e
|
||||
|
||||
if isinstance(e, pyrogram.errors.FloodWait):
|
||||
raise e
|
||||
|
||||
return None
|
||||
else:
|
||||
if in_memory:
|
||||
|
|
@ -1062,6 +1065,8 @@ class Client(Methods):
|
|||
await cdn_session.stop()
|
||||
except pyrogram.StopTransmission:
|
||||
raise
|
||||
except pyrogram.errors.FloodWait:
|
||||
raise
|
||||
except Exception as e:
|
||||
log.exception(e)
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Reference in a new issue