Skip to content

Commit b19732d

Browse files
update
1 parent 48e1147 commit b19732d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
252252
if (timeElapsed < MIN_DELAY_FOR_UNHANDLED_FAILURE) {
253253
// load() method is called in the application's startup code path.
254254
// Unhandled exceptions cause application crash which can result in crash loops as orchestrators attempt to restart the application.
255-
// Knowing the intended usage of the provider in startup code path, we mitigate back-to-back crash loops from overloading the server with requests by waiting a minimum time to propogate fatal errors.
255+
// Knowing the intended usage of the provider in startup code path, we mitigate back-to-back crash loops from overloading the server with requests by waiting a minimum time to propagate fatal errors.
256256
await new Promise(resolve => setTimeout(resolve, MIN_DELAY_FOR_UNHANDLED_FAILURE - timeElapsed));
257257
}
258258
}
@@ -351,6 +351,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
351351
if (!this.#isInitialLoadCompleted) {
352352
await this.#inspectFmPackage();
353353
const startTimestamp = Date.now();
354+
let postAttempts = 0;
354355
do { // at least try to load once
355356
try {
356357
await this.#loadSelectedAndWatchedKeyValues();
@@ -367,7 +368,6 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
367368
return;
368369
}
369370
const timeElapsed = Date.now() - startTimestamp;
370-
let postAttempts = 0;
371371
let backoffDuration = getFixedBackoffDuration(timeElapsed);
372372
if (backoffDuration === undefined) {
373373
postAttempts += 1;

src/refresh/RefreshTimer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class RefreshTimer {
77

88
constructor(interval: number) {
99
if (interval <= 0) {
10-
throw new RangeError(`Refresh interval must be greater than 0. Given: ${this.#interval}`);
10+
throw new RangeError(`Refresh interval must be greater than 0. Given: ${interval}`);
1111
}
1212

1313
this.#interval = interval;

0 commit comments

Comments
 (0)