mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-10 10:49:39 +00:00
Pump up default timeout from 5 to 10s
This commit is contained in:
@@ -11,7 +11,6 @@ Said subclasses need not to worry about reconnecting either, and
|
||||
should let the errors propagate instead.
|
||||
"""
|
||||
import abc
|
||||
from datetime import timedelta
|
||||
|
||||
|
||||
class Connection(abc.ABC):
|
||||
@@ -21,13 +20,13 @@ class Connection(abc.ABC):
|
||||
Subclasses should implement the actual protocol
|
||||
being used when encoding/decoding messages.
|
||||
"""
|
||||
def __init__(self, *, loop, proxy=None, timeout=timedelta(seconds=5)):
|
||||
def __init__(self, *, loop, timeout, proxy=None):
|
||||
"""
|
||||
Initializes a new connection.
|
||||
|
||||
:param loop: the event loop to be used.
|
||||
:param proxy: whether to use a proxy or not.
|
||||
:param timeout: timeout to be used for all operations.
|
||||
:param proxy: whether to use a proxy or not.
|
||||
"""
|
||||
self._loop = loop
|
||||
self._proxy = proxy
|
||||
|
Reference in New Issue
Block a user