diff --git a/ipv8/community.py b/ipv8/community.py index 9c153e2db..84145cb61 100644 --- a/ipv8/community.py +++ b/ipv8/community.py @@ -221,7 +221,7 @@ async def _bootstrap(self, bootstrapper: Bootstrapper) -> None: task = ensure_future(bootstrapper.initialize(self)) addresses = await bootstrapper.get_addresses(self, 60.0) - for address in (addresses if self.max_peers > 0 else islice(addresses, self.max_peers)): + for address in (islice(addresses, self.max_peers) if self.max_peers > 0 else addresses): self.walk_to(address) await task