Rev938, Disable publish on incoming older content update to avoid network spam

This commit is contained in:
HelloZeroNet 2016-03-05 09:57:30 +01:00
parent 08005499fb
commit 1d6f56c676
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.3.6" self.version = "0.3.6"
self.rev = 936 self.rev = 938
self.argv = argv self.argv = argv
self.action = None self.action = None
self.config_file = "zeronet.conf" self.config_file = "zeronet.conf"

View file

@ -563,7 +563,7 @@ class ContentManager(object):
"We have newer %s (Our: %s, Sent: %s)" % "We have newer %s (Our: %s, Sent: %s)" %
(inner_path, old_content["modified"], new_content["modified"]) (inner_path, old_content["modified"], new_content["modified"])
) )
gevent.spawn(self.site.publish, inner_path=inner_path) # Try to fix the broken peers # gevent.spawn(self.site.publish, inner_path=inner_path) # Try to fix the broken peers
return False return False
if new_content["modified"] > time.time() + 60 * 60 * 24: # Content modified in the far future (allow 1 day+) if new_content["modified"] > time.time() + 60 * 60 * 24: # Content modified in the far future (allow 1 day+)
self.log.error("%s modify is in the future!" % inner_path) self.log.error("%s modify is in the future!" % inner_path)