Merge "Bug 7846: ensure switch reconnection succeed in case of connection errors...
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / device / DeviceContextImpl.java
index b45234307fc14bcd5effe1b4e4fbc3863aacf57a..59192333f07ffbb1e97e1aabf99bac57557f0d53 100644 (file)
@@ -366,7 +366,9 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
         NodeRemovedBuilder builder = new NodeRemovedBuilder();
         builder.setNodeRef(new NodeRef(getDeviceInfo().getNodeInstanceIdentifier()));
         LOG.debug("Publishing node removed notification for {}", builder.build());
-        notificationPublishService.offerNotification(builder.build());
+        if (notificationPublishService != null) {
+          notificationPublishService.offerNotification(builder.build());
+        }
     }
 
     @Override