Make sure to also catch socket.error. Fixes #87
This commit is contained in:
parent
759ef15636
commit
6c8dd05872
|
@ -412,7 +412,7 @@ def getBestServer(servers):
|
||||||
h.request("GET", urlparts[2])
|
h.request("GET", urlparts[2])
|
||||||
r = h.getresponse()
|
r = h.getresponse()
|
||||||
total = (timeit.default_timer() - start)
|
total = (timeit.default_timer() - start)
|
||||||
except (HTTPError, URLError):
|
except (HTTPError, URLError, socket.error):
|
||||||
cum.append(3600)
|
cum.append(3600)
|
||||||
continue
|
continue
|
||||||
text = r.read(9)
|
text = r.read(9)
|
||||||
|
|
Loading…
Reference in New Issue