@@ -9,7 +9,6 @@ import { IKeyValueAdapter } from "./IKeyValueAdapter.js";
99import { JsonKeyValueAdapter } from "./JsonKeyValueAdapter.js" ;
1010import { DEFAULT_REFRESH_INTERVAL_IN_MS , MIN_REFRESH_INTERVAL_IN_MS } from "./RefreshOptions.js" ;
1111import { Disposable } from "./common/disposable.js" ;
12- import { ExclusiveExecutor } from "./common/mutex.js" ;
1312import { FEATURE_FLAGS_KEY_NAME , FEATURE_MANAGEMENT_KEY_NAME } from "./featureManagement/constants.js" ;
1413import { AzureKeyVaultKeyValueAdapter } from "./keyvault/AzureKeyVaultKeyValueAdapter.js" ;
1514import { RefreshTimer } from "./refresh/RefreshTimer.js" ;
@@ -41,7 +40,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
4140 #isInitialLoadCompleted: boolean = false ;
4241
4342 // Refresh
44- #refreshExecutor: ExclusiveExecutor = new ExclusiveExecutor ( ) ;
43+ #refreshInProgress: boolean = false ;
4544
4645 #refreshInterval: number = DEFAULT_REFRESH_INTERVAL_IN_MS ;
4746 #onRefreshListeners: Array < ( ) => any > = [ ] ;
@@ -353,7 +352,15 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
353352 throw new Error ( "Refresh is not enabled for key-values or feature flags." ) ;
354353 }
355354
356- await this . #refreshExecutor. execute ( this . #refreshTasks. bind ( this ) ) ;
355+ if ( this . #refreshInProgress) {
356+ return ;
357+ }
358+ this . #refreshInProgress = true ;
359+ try {
360+ await this . #refreshTasks( ) ;
361+ } finally {
362+ this . #refreshInProgress = false ;
363+ }
357364 }
358365
359366 async #refreshTasks( ) : Promise < void > {
0 commit comments