always add fixed peers if configured after 2s

This commit is contained in:
Jack Robison 2019-01-28 17:25:15 -05:00
parent 2a7d80f8b4
commit f507d95198
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -159,10 +159,8 @@ class StreamDownloader(StreamAssembler): # TODO: reduce duplication, refactor t
if self.fixed_peers:
def check_added_peers():
if not added_peers.is_set():
self._add_peer_protocols(self.fixed_peers)
log.info("no dht peers for download yet, adding fixed peer")
added_peers.set()
self._add_peer_protocols(self.fixed_peers)
log.info("adding fixed peer %s:%i", self.fixed_peers[0].address, self.fixed_peers[0].tcp_port)
add_fixed_peers_timer = self.loop.call_later(2, check_added_peers)