2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-09 18:55:51 +00:00

Allow user-defined values for retries and timeout

This commit is contained in:
Dan
2018-06-24 17:47:29 +02:00
parent 50ab50eb52
commit 69d1432251
3 changed files with 15 additions and 8 deletions

View File

@@ -23,6 +23,7 @@ from threading import Lock
from ..style import Markdown, HTML
from ...api.core import Object
from ...session.internals import MsgId
from ...session import Session
class BaseClient:
@@ -77,7 +78,7 @@ class BaseClient:
self.disconnect_handler = None
def send(self, data: Object):
def send(self, data: Object, retries: int = Session.MAX_RETRIES, timeout: float = Session.WAIT_TIMEOUT):
pass
def resolve_peer(self, peer_id: int or str):