count peer connection error, remove offline peers, content sign modification time fix, tracker order fix, reset peer hash_failed on download start, avoid util package name conflict
This commit is contained in:
parent
6424c82887
commit
3f974e0bc7
5 changed files with 36 additions and 15 deletions
|
@ -13,6 +13,7 @@ class Worker:
|
|||
|
||||
# Downloader thread
|
||||
def downloader(self):
|
||||
self.peer.hash_failed = 0 # Reset hash error counter
|
||||
while self.running:
|
||||
# Try to pickup free file download task
|
||||
task = self.manager.getTask(self.peer)
|
||||
|
@ -53,8 +54,8 @@ class Worker:
|
|||
task["workers_num"] -= 1
|
||||
self.manager.log.error("%s: Hash failed: %s" % (self.key, task["inner_path"]))
|
||||
time.sleep(1)
|
||||
self.peer.onWorkerDone()
|
||||
self.running = False
|
||||
self.peer.disconnect()
|
||||
self.manager.removeWorker(self)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue