Skip to content

Commit 2b17438

Browse files
bug: only SaveToUserProfileService if batch is finishing
_decisionBatchInProgress from true to false
1 parent 0dd1b74 commit 2b17438

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

OptimizelySDK/Bucketing/DecisionService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public class DecisionService
4949

5050
public bool DecisionBatchInProgress
5151
{
52-
get => _decisionBatchInProgress;
5352
set
5453
{
55-
_decisionBatchInProgress = value;
56-
if (!_decisionBatchInProgress)
54+
// Only save if the value is changing from true to false
55+
if (_decisionBatchInProgress && !value)
5756
{
5857
SaveToUserProfileService();
5958
}
59+
_decisionBatchInProgress = value;
6060
}
6161
}
6262

0 commit comments

Comments
 (0)