2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Set socket timeout to 10s

This commit is contained in:
Dan 2018-02-15 21:06:04 +01:00
parent 66156431ef
commit 5e6361defc

View File

@ -30,6 +30,7 @@ Proxy = namedtuple("Proxy", ["enabled", "hostname", "port", "username", "passwor
class TCP(socks.socksocket):
def __init__(self, proxy: Proxy):
super().__init__()
self.settimeout(10)
self.proxy_enabled = False
if proxy and proxy.enabled: