*Prevent ready from running fillConnections twice

This commit is contained in:
Derrick Hammer 2022-07-26 21:38:05 -04:00
parent 35eed2a157
commit 377b9548cf
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ export default class DHT {
}
ready(): Promise<void> {
if (this._inited) {
return Promise.resolve();
}
this._inited = true;
return this.fillConnections();
}