async def _maintain_connectivity(self):
    while True:
        (await asyncio.sleep(1))
        if self.stopping_soon:
            return
        now = time.time()
        if (len(self._peers) >= NUM_PEERS_TARGET):
            continue
        peers = (await self._get_next_peers_to_try())
        for peer in peers:
            if self._can_retry_addr(peer, now=now):
                try:
                    (await self._add_peer(peer.host, peer.port, peer.pubkey))
                except ErrorAddingPeer as e:
                    self.logger.info(f'failed to add peer: {peer}. exc: {e!r}')
async def _maintain_connectivity(self):
    while True:
        (await asyncio.sleep(1))
        if self.stopping_soon:
            return
        now = time.time()
        if (len(self._peers) >= NUM_PEERS_TARGET):
            continue
        peers = (await self._get_next_peers_to_try())
        for peer in peers:
            if self._can_retry_addr(peer, now=now):
                try:
                    (await self._add_peer(peer.host, peer.port, peer.pubkey))
                except ErrorAddingPeer as e:
                    self.logger.info(f'failed to add peer: {peer}. exc: {e!r}')