Skip to content

Commit 27da4ff

Browse files
committed
set to default
1 parent eeb62dc commit 27da4ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/client/eppo-client.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,18 @@ export default class EppoClient {
138138
sdkVersion,
139139
baseUrl, // Default is set in ApiEndpoints constructor if undefined
140140
requestTimeoutMs = DEFAULT_REQUEST_TIMEOUT_MS,
141-
pollingIntervalMs = DEFAULT_POLL_INTERVAL_MS,
142141
numInitialRequestRetries = DEFAULT_INITIAL_CONFIG_REQUEST_RETRIES,
143142
numPollRequestRetries = DEFAULT_POLL_CONFIG_REQUEST_RETRIES,
144143
pollAfterSuccessfulInitialization = false,
145144
pollAfterFailedInitialization = false,
146145
throwOnFailedInitialization = false,
147146
skipInitialPoll = false,
148147
} = this.configurationRequestParameters;
148+
149+
let { pollingIntervalMs = DEFAULT_POLL_INTERVAL_MS } = this.configurationRequestParameters;
149150
if (pollingIntervalMs <= 0) {
150-
logger.error('PollingIntervalMs must be greater than 0');
151+
logger.error('pollingIntervalMs must be greater than 0. Using default');
152+
pollingIntervalMs = DEFAULT_POLL_INTERVAL_MS;
151153
}
152154

153155
// todo: Inject the chain of dependencies below

0 commit comments

Comments
 (0)