dht-rpc 6.1.0 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/query.js +1 -0
- package/package.json +1 -1
package/lib/query.js
CHANGED
|
@@ -241,6 +241,7 @@ module.exports = class Query extends Readable {
|
|
|
241
241
|
if (m.closerNodes !== null) {
|
|
242
242
|
for (const node of m.closerNodes) {
|
|
243
243
|
node.id = peer.id(node.host, node.port)
|
|
244
|
+
if (this.dht._shouldAddNode !== null && !this.dht._shouldAddNode(node)) continue
|
|
244
245
|
if (b4a.equals(node.id, this.dht.table.id)) continue
|
|
245
246
|
// TODO: we could continue here instead of breaking to ensure that one of the nodes in the closer list
|
|
246
247
|
// is later marked as DOWN that we gossip that back
|