Jonathan Hart
Committed by Gerrit Code Review

Protect the RouteManagers threads from exceptions thrown by listeners

Change-Id: Ia260dcdcb83070939b96e4c7fb8d20baa0ae78a5
...@@ -279,12 +279,15 @@ public class RouteManager implements ListenerService<RouteEvent, RouteListener>, ...@@ -279,12 +279,15 @@ public class RouteManager implements ListenerService<RouteEvent, RouteListener>,
279 } 279 }
280 280
281 private void poll() { 281 private void poll() {
282 - try {
283 while (true) { 282 while (true) {
283 + try {
284 listener.event(queue.take()); 284 listener.event(queue.take());
285 - }
286 } catch (InterruptedException e) { 285 } catch (InterruptedException e) {
287 log.info("Route listener event thread shutting down: {}", e.getMessage()); 286 log.info("Route listener event thread shutting down: {}", e.getMessage());
287 + break;
288 + } catch (Exception e) {
289 + log.warn("Exception during route event handler", e);
290 + }
288 } 291 }
289 } 292 }
290 293
......