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): 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: