Browse Source

also check addNode in queries

session-estimator
Mathias Buus 2 years ago
parent
commit
d35fa50fb2
  1. 1
      lib/query.js

1
lib/query.js

@ -241,6 +241,7 @@ module.exports = class Query extends Readable {
if (m.closerNodes !== null) {
for (const node of m.closerNodes) {
node.id = peer.id(node.host, node.port)
if (this.dht._shouldAddNode !== null && !this.dht._shouldAddNode(node)) continue
if (b4a.equals(node.id, this.dht.table.id)) continue
// TODO: we could continue here instead of breaking to ensure that one of the nodes in the closer list
// is later marked as DOWN that we gossip that back

Loading…
Cancel
Save