Skip to content

Commit e6b032e

Browse files
committed
Correct prime synchronizer logic.
1 parent 382246d commit e6b032e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/SynchronizerStateManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ public boolean isPrimeSynchronizer() {
8383
for (int index = 0; index < synchronizers.size(); index++) {
8484
if (synchronizers.get(index).getState() == SynchronizerFactoryWithState.State.Available) {
8585
if (sourceIndex == index) {
86+
// This is the first synchronizer that is available, and it also is the current one.
8687
return true;
8788
}
89+
break;
90+
// Subsequently encountered synchronizers that are available are not the first one.
8891
}
8992
}
9093
}

0 commit comments

Comments
 (0)