mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Pump up default timeout from 5 to 10s
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import errno
|
||||
import struct
|
||||
from datetime import timedelta
|
||||
from zlib import crc32
|
||||
|
||||
from .common import Connection
|
||||
@@ -13,11 +12,11 @@ class ConnectionTcpFull(Connection):
|
||||
Default Telegram mode. Sends 12 additional bytes and
|
||||
needs to calculate the CRC value of the packet itself.
|
||||
"""
|
||||
def __init__(self, *, loop, proxy=None, timeout=timedelta(seconds=5)):
|
||||
super().__init__(loop=loop, proxy=proxy, timeout=timeout)
|
||||
def __init__(self, *, loop, timeout, proxy=None):
|
||||
super().__init__(loop=loop, timeout=timeout, proxy=proxy)
|
||||
self._send_counter = 0
|
||||
self.conn = TcpClient(
|
||||
proxy=self._proxy, timeout=self._timeout, loop=self._loop
|
||||
timeout=self._timeout, loop=self._loop, proxy=self._proxy
|
||||
)
|
||||
self.read = self.conn.read
|
||||
self.write = self.conn.write
|
||||
|
Reference in New Issue
Block a user