Skip to content

Commit 3a33738

Browse files
update
1 parent 9e32db4 commit 3a33738

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
237237
const abortSignal = abortController.signal;
238238
let timeoutId;
239239
try {
240-
// Promise.race will be settled when the first promise in the list is settled
240+
// Promise.race will be settled when the first promise in the list is settled.
241241
// It will not cancel the remaining promises in the list.
242-
// To avoid memory leaks, we need to cancel other promises when one promise is settled.
242+
// To avoid memory leaks, we must ensure other promises will be eventually terminated.
243243
await Promise.race([
244244
this.#initializeWithRetryPolicy(abortSignal),
245245
// this promise will be rejected after timeout
@@ -353,7 +353,6 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
353353
if (this.#featureFlagEnabled) {
354354
await this.#loadFeatureFlags();
355355
}
356-
// Mark all settings have loaded at startup.
357356
this.#isInitialLoadCompleted = true;
358357
break;
359358
} catch (error) {
@@ -657,7 +656,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
657656
return response;
658657
}
659658

660-
// Only operations related to Azure App Configuration service should be executed with failover policy.
659+
// Only operations related to Azure App Configuration should be executed with failover policy.
661660
async #executeWithFailoverPolicy(funcToExecute: (client: AppConfigurationClient) => Promise<any>): Promise<any> {
662661
let clientWrappers = await this.#clientManager.getClients();
663662
if (this.#options?.loadBalancingEnabled && this.#lastSuccessfulEndpoint !== "" && clientWrappers.length > 1) {

0 commit comments

Comments
 (0)