peer is offline if download fails

This commit is contained in:
j 2016-02-04 18:37:19 +05:30
parent 8c5f21c83d
commit 46ee94813f
1 changed files with 1 additions and 0 deletions

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: