summaryrefslogtreecommitdiffstats
path: root/v3po
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-08-24 13:08:49 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-08-24 13:51:30 +0200
commit31996a6707d75a5f87f7d8c89f563af74e32fe70 (patch)
tree6f615c73e831cf459c0aeb71a8565d7973ae0aa3 /v3po
parent26e7c2dcd0d1b1e5d9efb475eeb78effb897a731 (diff)
NamingContext.getNameIfPresent should not fail if name is missing
Also makes InterfaceChangeNotificationProducer notification translation code more defensive. The issue was revealed by HC2VPP-216 and HC2VPP-220. Change-Id: I20792a51743ae621d86c1b9066d680bc2303ed82 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
index e971db2ee..44da8279c 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
@@ -79,7 +79,13 @@ final class InterfaceChangeNotificationProducer implements ManagedNotificationPr
swInterfaceEventNotification -> {
LOG.trace("Interface notification received: {}", swInterfaceEventNotification);
// TODO HONEYCOMB-166 this should be lazy
- collector.onNotification(transformNotification(swInterfaceEventNotification));
+ try {
+ collector.onNotification(transformNotification(swInterfaceEventNotification));
+ } catch (Exception e) {
+ // There is no need to propagate exception to jvpp rx thread in case of unexpected failures.
+ // We can't do much about it, so lets log the exception.
+ LOG.warn("Failed to process interface notification {}", swInterfaceEventNotification, e);
+ }
}
);
}