From 9350daee68bf056e4467b602220d8dfba51c821d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 27 Nov 2022 02:12:21 -0500 Subject: [PATCH] *Prune graph on node disconnect --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 9b7ca85..8efcaae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -263,6 +263,7 @@ export default class DHTCache extends EventEmitter { this._removeEntityConnection(id, b4a.from(toId as Uint8Array) as Buffer); this.emit("peer-remove-seen", id, toId); this._recalculate(); + this._pruneItems(); } else if (type === Type.BOOTSTRAP_REQUEST) { const bootstrap = this._getBootstrapInfo(); this.broadcast(