diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java index 5d011f0c..df968f99 100644 --- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java @@ -370,10 +370,7 @@ public class SdcReceptionHandler extends AbstractReceptionHandler implements INo * @param newStatus the new status */ private void handleIdleStatusChange(final SdcReceptionHandlerStatus newStatus) { - if (nbOfNotificationsOngoing.get() > 1) { - nbOfNotificationsOngoing.decrementAndGet(); - } else { - nbOfNotificationsOngoing.set(0); + if (nbOfNotificationsOngoing.getAndUpdate(curval -> Math.max(0, curval - 1)) == 0) { sdcReceptionHandlerStatus = newStatus; } } |