Rev597, Dont load content.json if the modified date is same, Big content.json memory optimalzations, Peerhashfield memory optimalzations and typo fix, Give up on file after 10 retry, Fix non-ascii install paths, Stop worker after 10 connection error

This commit is contained in:
HelloZeroNet 2015-11-15 11:13:57 +01:00
parent 7f05e96f05
commit 3d558a4edf
6 changed files with 26 additions and 9 deletions

View file

@ -73,7 +73,7 @@ class Worker(object):
task["failed"].append(self.peer)
self.task = None
self.peer.hash_failed += 1
if self.peer.hash_failed >= max(len(self.manager.tasks), 3):
if self.peer.hash_failed >= max(len(self.manager.tasks), 3) or self.peer.connection_error > 10:
# Broken peer: More fails than tasks number but atleast 3
break
task["workers_num"] -= 1