diff --git a/src/lib/nodes/abstract.client.ts b/src/lib/nodes/abstract.client.ts index 096efdad4..197285ae4 100644 --- a/src/lib/nodes/abstract.client.ts +++ b/src/lib/nodes/abstract.client.ts @@ -53,9 +53,6 @@ export abstract class Client { } protected async watchNodeStatusChange() { - await Promise.all(this.nodes.map((node) => node.startHealthcheck())) - this.resolve() - for (const node of this.nodes) { node.onStatusChange((nodeStatus) => { this.updateSyncStatuses() @@ -68,6 +65,9 @@ export abstract class Client { } }) } + + await Promise.all(this.nodes.map((node) => node.startHealthcheck())) + this.resolve() } /**