commit | f79ab48e2ef52219e52b6509a6a0fc86330e7517 | [log] [tgz] |
---|---|---|
author | Jonathan Hart <jono@onlab.us> | Fri Aug 19 14:20:50 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Mon Aug 22 16:51:45 2016 +0000 |
tree | ec5691478e1c221a2b0cbeac6ae74487eab97736 | |
parent | a1c41154de95b26aa2a49a4a89956598aa88c879 [diff] |
Protect the RouteManagers threads from exceptions thrown by listeners Change-Id: Ia260dcdcb83070939b96e4c7fb8d20baa0ae78a5
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java b/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java index 684cc34..a362316 100644 --- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java +++ b/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java
@@ -279,12 +279,15 @@ } private void poll() { - try { - while (true) { + while (true) { + try { listener.event(queue.take()); + } catch (InterruptedException e) { + log.info("Route listener event thread shutting down: {}", e.getMessage()); + break; + } catch (Exception e) { + log.warn("Exception during route event handler", e); } - } catch (InterruptedException e) { - log.info("Route listener event thread shutting down: {}", e.getMessage()); } }