dht_crawler: dont gather empty, fix crash

This commit is contained in:
Victor Shyba 2022-06-11 15:57:20 -03:00 committed by Victor Shyba
parent adc79ec404
commit 90c2a58470

View file

@ -248,6 +248,7 @@ class Crawler:
log.info("%d known, %d contacted recently, %d unreachable, %d error, %d processing, %d on queue",
self.recent_peers_query.count(), self.checked_peers_count, self.unreachable_peers_count,
self.peers_with_errors_count, len(to_process), len(to_check))
if to_process:
await asyncio.wait(to_process.values(), return_when=asyncio.FIRST_COMPLETED)
to_check = self.get_peers_needing_check()
while not to_check and not to_process: