Fix the locking problem reported by Pavlin when a port goes down and the intents couldn't removed.
Change-Id: Ia6deb8e8ceafaed236d03eb8fa358fb29f8eb7f2
diff --git a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
index b8761a4..37015cb 100755
--- a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
+++ b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
@@ -158,10 +158,11 @@
@Override
public IntentOperationList executeIntentOperations(IntentOperationList list) {
- lock.lock(); // TODO optimize locking using smaller steps
if (list == null || list.size() == 0)
return null;
PerfLogger p = new PerfLogger("executeIntentOperations_" + list.get(0).operator);
+
+ lock.lock(); // TODO optimize locking using smaller steps
try {
// update the map of high-level intents
p.log("begin_updateInMemoryIntents");