From 5b2d1a3c7cdb84a673394e292c71fb4afefc3994 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 5 Dec 2022 15:03:53 -0500 Subject: [PATCH] *Skip self --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 5c6a6a2..08436b7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -423,6 +423,10 @@ export default class DHTCache extends EventEmitter { } for (const id of online) { + if (b4a.equals(b4a.from(id, "hex"), this.id)) { + continue; + } + const item = this.graph.node.get(id); if (!item?.online) { online.delete(id);