Skip to content

Commit

Permalink
ALL-3800 - Fix potential memory issues in LoadBalancer - misc 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Smrecz committed Dec 14, 2023
1 parent 166cc30 commit d78aab5
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/service/rpc/generic/LoadBalancer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,19 @@ export class LoadBalancer implements AbstractRpcInterface {
}

private async checkStatuses() {
await this.checkStatus(RpcNodeType.NORMAL)
await this.checkStatus(RpcNodeType.ARCHIVE)
this.checkIfNoActiveNodes()
try {
await this.checkStatus(RpcNodeType.NORMAL)
await this.checkStatus(RpcNodeType.ARCHIVE)
this.checkIfNoActiveNodes()
} catch (e) {
Utils.log({
id: this.id,
message: `LoadBalancing failed to check statuses. Error: ${JSON.stringify(
e,
Object.getOwnPropertyNames(e),
)}`,
})
}
}

private checkIfNoActiveNodes() {
Expand Down

0 comments on commit d78aab5

Please sign in to comment.