Don't increment bad_file
failed tries counter on rediscovering the same file on update()
Do increment it only on actual fileFailed() event.
This commit is contained in:
parent
1fd1f47a94
commit
ce971ab738
1 changed files with 2 additions and 2 deletions
|
@ -629,7 +629,7 @@ class Site(object):
|
||||||
if has_newer:
|
if has_newer:
|
||||||
# We dont have this file or we have older
|
# We dont have this file or we have older
|
||||||
modified_contents.append(inner_path)
|
modified_contents.append(inner_path)
|
||||||
self.bad_files[inner_path] = self.bad_files.get(inner_path, 0) + 1
|
self.bad_files[inner_path] = self.bad_files.get(inner_path, 1)
|
||||||
if has_older:
|
if has_older:
|
||||||
send_back.append(inner_path)
|
send_back.append(inner_path)
|
||||||
|
|
||||||
|
@ -1163,7 +1163,7 @@ class Site(object):
|
||||||
self.log.debug("%s: Download not allowed" % inner_path)
|
self.log.debug("%s: Download not allowed" % inner_path)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.bad_files[inner_path] = self.bad_files.get(inner_path, 0) + 1 # Mark as bad file
|
self.bad_files[inner_path] = self.bad_files.get(inner_path, 1) # Mark as bad file
|
||||||
|
|
||||||
task = self.worker_manager.addTask(inner_path, peer, priority=priority, file_info=file_info)
|
task = self.worker_manager.addTask(inner_path, peer, priority=priority, file_info=file_info)
|
||||||
if blocking:
|
if blocking:
|
||||||
|
|
Loading…
Reference in a new issue