Merge "Fix for cache cleanup in protocol plugin on container deletion"
[controller.git] / opendaylight / protocol_plugins / openflow / src / main / java / org / opendaylight / controller / protocol_plugin / openflow / internal / InventoryServiceShim.java
index adc121816b818d099469aa1919b74b2295b60152..8db83f0fc7e2449b99079aadf5dfc709204f2f35 100644 (file)
@@ -484,8 +484,7 @@ public class InventoryServiceShim implements IContainerListener,
         Set<Property> props = new HashSet<Property>();
         Long sid = (Long) node.getID();
 
-        Date connectedSince = controller.getSwitches().get(sid)
-                .getConnectedDate();
+        Date connectedSince = sw.getConnectedDate();
         Long connectedSinceTime = (connectedSince == null) ? 0 : connectedSince
                 .getTime();
         props.add(new TimeStamp(connectedSinceTime, "connectedSince"));