mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Pump up default timeout from 5 to 10s
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import os
|
||||
from datetime import timedelta
|
||||
|
||||
from .tcpfull import ConnectionTcpFull
|
||||
from .tcpabridged import ConnectionTcpAbridged
|
||||
from .tcpfull import ConnectionTcpFull
|
||||
from ...crypto import AESModeCTR
|
||||
|
||||
|
||||
@@ -12,8 +11,8 @@ class ConnectionTcpObfuscated(ConnectionTcpAbridged):
|
||||
every message with a randomly generated key using the
|
||||
AES-CTR mode so the packets are harder to discern.
|
||||
"""
|
||||
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._aes_encrypt, self._aes_decrypt = None, None
|
||||
self.read = lambda s: self._aes_decrypt.encrypt(self.conn.read(s))
|
||||
self.write = lambda d: self.conn.write(self._aes_encrypt.encrypt(d))
|
||||
|
Reference in New Issue
Block a user