peer is offline if download fails
This commit is contained in:
parent
8c5f21c83d
commit
46ee94813f
1 changed files with 1 additions and 0 deletions
|
@ -355,6 +355,7 @@ class Node(Thread):
|
||||||
r = self._opener.open(url, timeout=self.TIMEOUT*2)
|
r = self._opener.open(url, timeout=self.TIMEOUT*2)
|
||||||
except:
|
except:
|
||||||
logger.debug('download failed %s', url, exc_info=True)
|
logger.debug('download failed %s', url, exc_info=True)
|
||||||
|
self.online = False
|
||||||
return False
|
return False
|
||||||
code = r.getcode()
|
code = r.getcode()
|
||||||
if code == 200:
|
if code == 200:
|
||||||
|
|
Loading…
Reference in a new issue