[ONOS-7565] Flow rules error while rerouting intents with Flow Objectives

Change-Id: I785e2e82cabda23b07816e572ccfde4bed45a3f2
This commit is contained in:
Devin Lim 2018-03-28 18:13:33 -07:00 committed by Jordan Halterman
parent c2bf02a31c
commit cdca195585

View File

@ -837,11 +837,11 @@ public class ECFlowRuleStore
}
public void add(FlowEntry rule) {
StoredFlowEntry stored = getFlowEntriesInternal(rule.deviceId(), rule.id())
.putIfAbsent((StoredFlowEntry) rule, (StoredFlowEntry) rule);
if (stored == null) {
lastUpdateTimes.put(rule.deviceId(), System.currentTimeMillis());
}
getFlowEntriesInternal(rule.deviceId(), rule.id())
.compute((StoredFlowEntry) rule, (k, stored) -> {
return (StoredFlowEntry) rule;
});
lastUpdateTimes.put(rule.deviceId(), System.currentTimeMillis());
}
public void update(FlowEntry rule) {