Skip to content

Commit c15cf1b

Browse files
update
1 parent 2720628 commit c15cf1b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type PagedSettingSelector = SettingSelector & {
5050
};
5151

5252
const DEFAULT_STARTUP_TIMEOUT = 100 * 1000; // 100 seconds in milliseconds
53-
const MAX_STARTUP_TIMEOUT = 30 * 60 * 1000; // 15 minutes in milliseconds
53+
const MAX_STARTUP_TIMEOUT = 60 * 60 * 1000; // 60 minutes in milliseconds
5454

5555
export class AzureAppConfigurationImpl implements AzureAppConfiguration {
5656
/**
@@ -333,7 +333,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
333333
* Initializes the configuration provider.
334334
*/
335335
async #initialize() {
336-
if (this.#isInitialLoadCompleted) {
336+
if (!this.#isInitialLoadCompleted) {
337337
await this.#inspectFmPackage();
338338
const startTimestamp = Date.now();
339339
while (startTimestamp + MAX_STARTUP_TIMEOUT > Date.now()) {
@@ -357,6 +357,9 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
357357
console.warn("Failed to load configuration settings at startup. Retrying...");
358358
}
359359
}
360+
if (!this.#isInitialLoadCompleted) {
361+
throw new Error("Load operation exceeded the maximum startup timeout.");
362+
}
360363
}
361364
}
362365

0 commit comments

Comments
 (0)