Make sure to also catch socket.error. Fixes #87

This commit is contained in:
Matt Martz 2014-07-29 17:14:41 -05:00
parent 759ef15636
commit 6c8dd05872
1 changed files with 1 additions and 1 deletions

View File

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