peer is offline if download fails

This commit is contained in:
j 2016-02-04 18:37:19 +05:30
parent 8c5f21c83d
commit 46ee94813f

View file

@ -355,6 +355,7 @@ class Node(Thread):
r = self._opener.open(url, timeout=self.TIMEOUT*2)
except:
logger.debug('download failed %s', url, exc_info=True)
self.online = False
return False
code = r.getcode()
if code == 200: