retry on version extended also

This commit is contained in:
Jay Lee
2019-06-20 11:43:45 -04:00
parent ea8cda72c7
commit c931e1cdd7

View File

@@ -822,10 +822,16 @@ def _getServerTLSUsed(location):
conn = 'https:%s' % netloc
httpc = _createHttpObj()
headers = {'user-agent': GAM_INFO}
try:
httpc.request(url, headers=headers)
except (httplib2.ServerNotFoundError, RuntimeError) as e:
systemErrorExit(4, e)
retries = 5
for n in range(1, retries+1):
try:
httpc.request(url, headers=headers)
except (httplib2.ServerNotFoundError, RuntimeError) as e:
if n != retries:
httpc.connections = {}
waitOnFailure(n, retries, str(e))
continue
systemErrorExit(4, str(e))
cipher_name, tls_ver, _ = httpc.connections[conn].sock.cipher()
return tls_ver, cipher_name