mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Set socket timeout to 10s
This commit is contained in:
parent
66156431ef
commit
5e6361defc
@ -30,6 +30,7 @@ Proxy = namedtuple("Proxy", ["enabled", "hostname", "port", "username", "passwor
|
|||||||
class TCP(socks.socksocket):
|
class TCP(socks.socksocket):
|
||||||
def __init__(self, proxy: Proxy):
|
def __init__(self, proxy: Proxy):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
self.settimeout(10)
|
||||||
self.proxy_enabled = False
|
self.proxy_enabled = False
|
||||||
|
|
||||||
if proxy and proxy.enabled:
|
if proxy and proxy.enabled:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user