From b47502ac9da4c5f6d2a18f0e665323e696e47fbc Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 26 Nov 2022 19:39:03 -0500 Subject: [PATCH] *Set flag before event emit --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ffc618c..9b7ca85 100644 --- a/src/index.ts +++ b/src/index.ts @@ -356,8 +356,9 @@ export default class DHTCache extends EventEmitter { } } - this.emit("bootstrapped"); this.bootstrapped = true; + this.emit("bootstrapped"); + this._recalculate(); }