Commit 19f6cacc authored by Julien Muchembled's avatar Julien Muchembled

registry: fix condition to decide when to refresh list of peers

parent 5d157c4d
...@@ -313,7 +313,7 @@ class RegistryServer(object): ...@@ -313,7 +313,7 @@ class RegistryServer(object):
with self.lock: with self.lock:
cert = self._getCert(cn) cert = self._getCert(cn)
age, peers = self._peers age, peers = self._peers
if time.time() < age or not peers: if age < time.time() or not peers:
peers = [x[1] for x in utils.iterRoutes(self.network)] peers = [x[1] for x in utils.iterRoutes(self.network)]
random.shuffle(peers) random.shuffle(peers)
self._peers = time.time() + 60, peers self._peers = time.time() + 60, peers
......
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