dht_crawler: only warn for missing key if it replied

This commit is contained in:
Victor Shyba 2022-06-11 03:10:30 -03:00 committed by Victor Shyba
parent 137d8ca4ac
commit adc79ec404

View file

@ -193,7 +193,7 @@ class Crawler:
pass
self.set_latency(make_kademlia_peer(key, address, port), latency if key else None)
if not latency or not key:
if not key:
if latency and not key:
log.warning("No node id from %s:%d", host, port)
return set()
node_id = key