Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 06fdd3e

Browse files
committed
only log initialization message once in polling mode
1 parent 7cb20cd commit 06fdd3e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/launchdarkly/sdk/server/PollingProcessor.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ private void poll() {
9696
} else {
9797
if (dataSourceUpdates.init(allData.toFullDataSet())) {
9898
dataSourceUpdates.updateStatus(State.VALID, null);
99-
logger.info("Initialized LaunchDarkly client.");
100-
initialized.getAndSet(true);
101-
initFuture.complete(null);
99+
if (!initialized.getAndSet(true)) {
100+
logger.info("Initialized LaunchDarkly client.");
101+
initFuture.complete(null);
102+
}
102103
}
103104
}
104105
} catch (HttpErrorException e) {

0 commit comments

Comments
 (0)