Fixes invalidate nextid
Change-Id: I475899566fcd2a51dd7d0e672ede6e65e25c8f78
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java
index e46c1d8..8c4968a 100644
--- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java
+++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java
@@ -1240,7 +1240,8 @@
(objective, error) -> {
log.warn("Failed to add {} on {}/{}, vlan {}: {}",
mcastIp, deviceId, port.toLong(), assignedVlan, error);
- srManager.invalidateNextObj(objective.id());
+ // Schedule the removal using directly the key
+ mcastWorker.execute(() -> mcastNextObjStore.remove(mcastStoreKey));
});
ForwardingObjective fwdObj = mcastUtils.fwdObjBuilder(mcastIp, assignedVlan,
newNextObj.id()).add(context);