Commit 94e8a309 authored by Julien Muchembled's avatar Julien Muchembled

Fix bootstrap issue when cache contains "many" and only down peers

parent 36e6ea82
......@@ -263,13 +263,16 @@ class TunnelManager(object):
# No route/tunnel to registry, which usually happens when starting
# up. Select peers from cache for which we have no route.
new = 0
bootstrap = True
for peer, address in self._peer_db.getPeerList():
if peer not in disconnected and self._makeTunnel(peer, address):
if peer not in disconnected:
bootstrap = False
if self._makeTunnel(peer, address):
new += 1
if new == count:
return
if not (new or disconnected):
if not (self._served or self._connection_dict):
if bootstrap:
# Startup without any good address in the cache.
peer = self._peer_db.getBootstrapPeer()
if peer and self._makeTunnel(*peer):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment