From 44fc841ee1c9a64b4eaa38d1e93b8e867b06fbd0 Mon Sep 17 00:00:00 2001 From: Mattia Codato Date: Fri, 31 Jul 2020 10:42:01 +0200 Subject: [PATCH] Notify to all nodes that execution has completed --- lib/icinga/clusterevents-check.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icinga/clusterevents-check.cpp b/lib/icinga/clusterevents-check.cpp index 0ca53030c..63b2478f9 100644 --- a/lib/icinga/clusterevents-check.cpp +++ b/lib/icinga/clusterevents-check.cpp @@ -88,9 +88,9 @@ static void SendEventExecuteCommand(const Dictionary::Ptr& params, long exitStat executedParams->Set("start", start); executedParams->Set("end", end); - if (origin->IsLocal()) { - ClusterEvents::ExecutedCommandAPIHandler(origin, executedParams); - } else { + ClusterEvents::ExecutedCommandAPIHandler(origin, executedParams); + + if (!origin->IsLocal()) { Dictionary::Ptr executedMessage = new Dictionary(); executedMessage->Set("jsonrpc", "2.0"); executedMessage->Set("method", "event::ExecutedCommand");