mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-04-10 12:14:13 +03:00
Retry on RpcCallFailError
This commit is contained in:
parent
5dc43276bb
commit
544651caa7
|
@ -11,7 +11,8 @@ from .crypto import rsa
|
|||
from .errors import (
|
||||
RPCError, BrokenAuthKeyError, ServerError, FloodWaitError,
|
||||
FloodTestPhoneWaitError, TypeNotFoundError, UnauthorizedError,
|
||||
PhoneMigrateError, NetworkMigrateError, UserMigrateError, AuthKeyError
|
||||
PhoneMigrateError, NetworkMigrateError, UserMigrateError, AuthKeyError,
|
||||
RpcCallFailError
|
||||
)
|
||||
from .network import authenticator, MtProtoSender, Connection, ConnectionMode
|
||||
from .sessions import Session, SQLiteSession
|
||||
|
@ -570,9 +571,9 @@ class TelegramBareClient:
|
|||
self._reconnect(new_dc=e.new_dc)
|
||||
return self._invoke(call_receive, *requests)
|
||||
|
||||
except ServerError as e:
|
||||
except (ServerError, RpcCallFailError) as e:
|
||||
# Telegram is having some issues, just retry
|
||||
__log__.error('Telegram servers are having internal errors %s', e)
|
||||
__log__.warning('Telegram is having internal issues: %s', e)
|
||||
|
||||
except (FloodWaitError, FloodTestPhoneWaitError) as e:
|
||||
__log__.warning('Request invoked too often, wait %ds', e.seconds)
|
||||
|
|
Loading…
Reference in New Issue
Block a user