don't attempt to announce blobs until we we have contacts in routing

This commit is contained in:
Jack Robison 2018-08-09 09:00:36 -04:00
parent 7931397595
commit 5fe8022b15
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -74,6 +74,9 @@ class DHTHashAnnouncer(object):
@defer.inlineCallbacks @defer.inlineCallbacks
def manage(self): def manage(self):
if not self.dht_node.contacts:
log.info("Not ready to start announcing hashes")
return
need_reannouncement = yield self.storage.get_blobs_to_announce() need_reannouncement = yield self.storage.get_blobs_to_announce()
if need_reannouncement: if need_reannouncement:
yield self.immediate_announce(need_reannouncement) yield self.immediate_announce(need_reannouncement)