Bug 5542 - Southbound plugin doesn't allow controller initiated re-connection
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / OvsdbConnectionManager.java
index acb665a98c23a6fa0e7c6fbba9ccd674ede58d9c..6f7f8595745acec5b96236bec85e50c0c21f7d03 100644 (file)
@@ -158,6 +158,10 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos
             txInvoker.invoke(new OvsdbNodeRemoveCommand(ovsdbConnectionInstance, null, null));
 
             removeConnectionInstance(key);
+
+            //Controller initiated connection can be terminated from switch side.
+            //So cleanup the instance identifier cache.
+            removeInstanceIdentifier(key);
         } else {
             LOG.warn("disconnected : Connection instance not found for OVSDB Node {} ", key);
         }