From e0fae910b1de6733c3887579ea6ce8f7de89308c Mon Sep 17 00:00:00 2001 From: Jordan Halterman Date: Thu, 18 May 2017 12:52:51 -0700 Subject: [PATCH] [ONOS-6487] Catch and log exceptions that occur during replication in ECM Change-Id: I27135677af1331f1782739adc7eeb517a623e119 --- .../impl/EventuallyConsistentMapImpl.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java index 41b6afdf53..97efec4eef 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java @@ -922,15 +922,19 @@ public class EventuallyConsistentMapImpl items.forEach(item -> map.compute(item.key(), (key, existing) -> item.isNewerThan(existing) ? item : existing)); communicationExecutor.execute(() -> { - clusterCommunicator.unicast(ImmutableList.copyOf(map.values()), - updateMessageSubject, - serializer::encode, - peer) - .whenComplete((result, error) -> { - if (error != null) { - log.debug("Failed to send to {}", peer, error); - } - }); + try { + clusterCommunicator.unicast(ImmutableList.copyOf(map.values()), + updateMessageSubject, + serializer::encode, + peer) + .whenComplete((result, error) -> { + if (error != null) { + log.debug("Failed to send to {}", peer, error); + } + }); + } catch (Exception e) { + log.warn("Failed to send to {}", peer, e); + } }); } }