Reduce network timeout to 15 seconds

This commit is contained in:
Arun Prakash Jana 2018-05-26 21:35:42 +05:30
parent e68bc3e472
commit b2c27800c4
No known key found for this signature in database
GPG Key ID: A75979F35C080412

View File

@ -2985,9 +2985,9 @@ def get_PoolManager():
"""
if myproxy:
return urllib3.ProxyManager(myproxy, num_pools=1, headers=myheaders)
return urllib3.ProxyManager(myproxy, num_pools=1, headers=myheaders, timeout=15)
return urllib3.PoolManager(num_pools=1, headers=myheaders)
return urllib3.PoolManager(num_pools=1, headers=myheaders, timeout=15)
def network_handler(url, http_head=False):
@ -3023,7 +3023,7 @@ def network_handler(url, http_head=False):
manager = get_PoolManager()
while True:
resp = manager.request(method, url, timeout=40)
resp = manager.request(method, url)
if resp.status == 200:
if method == 'GET':