Skip to content

Commit

Permalink
fix(Nodes): don't block onStatusChange callback
Browse files Browse the repository at this point in the history
  • Loading branch information
bludnic committed Aug 26, 2024
1 parent 938cd8a commit 6cb288a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/nodes/abstract.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ export abstract class Client<N extends Node> {
}

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()
Expand All @@ -68,6 +65,9 @@ export abstract class Client<N extends Node> {
}
})
}

await Promise.all(this.nodes.map((node) => node.startHealthcheck()))
this.resolve()
}

/**
Expand Down

0 comments on commit 6cb288a

Please sign in to comment.