Skip to content

Commit 9a38443

Browse files
fix bug
1 parent 9300106 commit 9a38443

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ConfigurationClientManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class ConfigurationClientManager {
3232
#validDomain: string;
3333
#staticClients: ConfigurationClientWrapper[]; // there should always be only one static client
3434
#dynamicClients: ConfigurationClientWrapper[];
35+
#replicaCount: number = 0;
3536
#lastFallbackClientRefreshTime: number = 0;
3637
#lastFallbackClientRefreshAttempt: number = 0;
3738

@@ -97,7 +98,7 @@ export class ConfigurationClientManager {
9798
}
9899

99100
getReplicaCount(): number {
100-
return this.#dynamicClients.length;
101+
return this.#replicaCount;
101102
}
102103

103104
async getClients(): Promise<ConfigurationClientWrapper[]> {
@@ -165,6 +166,7 @@ export class ConfigurationClientManager {
165166

166167
this.#dynamicClients = newDynamicClients;
167168
this.#lastFallbackClientRefreshTime = Date.now();
169+
this.#replicaCount = this.#dynamicClients.length;
168170
}
169171

170172
/**

0 commit comments

Comments
 (0)