dht_crawler: warn if we cannot get node id

This commit is contained in:
Victor Shyba 2022-06-11 03:04:45 -03:00 committed by Victor Shyba
parent 6c350e57dd
commit abf4d888af

View file

@ -184,8 +184,10 @@ class Crawler:
except lbry.dht.error.RemoteException: except lbry.dht.error.RemoteException:
self.inc_errors(make_kademlia_peer(None, address, port)) self.inc_errors(make_kademlia_peer(None, address, port))
pass pass
self.set_latency(make_kademlia_peer(key, address, port), latency) self.set_latency(make_kademlia_peer(key, address, port), latency if key else None)
if not latency: if not latency or not key:
if not key:
log.warning("No node id from %s:%d", host, port)
return set() return set()
node_id = key node_id = key
distance = Distance(key) distance = Distance(key)