Skip to content
Snippets Groups Projects
Commit 7b941cad authored by Ryan Izard's avatar Ryan Izard
Browse files

Only remove once, else ConcurrentModificationExceptions will ensue...

parent 649cff0d
No related branches found
No related tags found
No related merge requests found
...@@ -210,10 +210,12 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF ...@@ -210,10 +210,12 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF
flowSetIdToNpts.remove(flowSetId); flowSetIdToNpts.remove(flowSetId);
Iterator<Entry<NodePortTuple, Set<U64>>> itr = nptToFlowSetIds.entrySet().iterator(); Iterator<Entry<NodePortTuple, Set<U64>>> itr = nptToFlowSetIds.entrySet().iterator();
boolean removed = false;
while (itr.hasNext()) { while (itr.hasNext()) {
Entry<NodePortTuple, Set<U64>> e = itr.next(); Entry<NodePortTuple, Set<U64>> e = itr.next();
if (e.getKey().equals(avoid)) { if (e.getKey().equals(avoid) && ! removed) {
avoidItr.remove(); avoidItr.remove();
removed = true;
} else { } else {
Set<U64> ids = e.getValue(); Set<U64> ids = e.getValue();
ids.remove(flowSetId); ids.remove(flowSetId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment