File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ type PagedSettingSelector = SettingSelector & {
5050} ;
5151
5252const DEFAULT_STARTUP_TIMEOUT = 100 * 1000 ; // 100 seconds in milliseconds
53+ const MAX_STARTUP_TIMEOUT = 60 * 60 * 1000 ; // 60 minutes in milliseconds
5354
5455export class AzureAppConfigurationImpl implements AzureAppConfiguration {
5556 /**
@@ -336,7 +337,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
336337 await this . #inspectFmPackage( ) ;
337338 const retryEnabled = this . #options?. startupOptions ?. retryEnabled ?? false ;
338339 const startTimestamp = Date . now ( ) ;
339- while ( true ) {
340+ while ( startTimestamp + MAX_STARTUP_TIMEOUT > Date . now ( ) ) {
340341 try {
341342 await this . #loadSelectedAndWatchedKeyValues( ) ;
342343 if ( this . #featureFlagEnabled) {
@@ -361,6 +362,9 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
361362 }
362363 }
363364 }
365+ if ( ! this . #isInitialLoadCompleted) {
366+ throw new Error ( "Load operation exceeded the maximum startup timeout limitation." ) ;
367+ }
364368 }
365369 }
366370
You can’t perform that action at this time.
0 commit comments