mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Handle FloodWaitError in client.download_media
Fixes #1426. Not entirely happy with the new indirection layer, but the original __call__ method is already a mess anyway and the additional cost of an extra call should be neglible compared to the actual IO.
This commit is contained in:
@@ -1039,7 +1039,7 @@ class MessageMethods:
|
||||
if exported:
|
||||
try:
|
||||
sender = await self._borrow_exported_sender(entity.dc_id)
|
||||
return await sender.send(request)
|
||||
return await self._call(sender, request)
|
||||
finally:
|
||||
await self._return_exported_sender(sender)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user