Per Jim's last comments.
Issue-ID: POLICY-2305
Change-Id: I1bc73dcd264e9a122f6ec0eece08202cbcb3a8e9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
* @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;
}
}