From: Gunnar Beutner Date: Thu, 15 Oct 2015 07:28:20 +0000 (+0200) Subject: Fix: ApiListener::SyncRelayMessage doesn't send message to all zone members X-Git-Tag: v2.3.11~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c993bb2888adf7c246b7f9ff23dec9e6fa53049;p=icinga2 Fix: ApiListener::SyncRelayMessage doesn't send message to all zone members fixes #10365 --- diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 7e1e3c52c..524438a1b 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -539,13 +539,17 @@ void ApiListener::SyncRelayMessage(const MessageOrigin& origin, const DynamicObj } /* don't relay messages to disconnected endpoints */ - if (!endpoint->IsConnected()) + if (!endpoint->IsConnected()) { + if (target_zone == my_zone) + finishedLogZones.erase(target_zone); + continue; + } finishedLogZones.insert(target_zone); - /* don't relay the message to the zone through more than one endpoint */ - if (finishedZones.find(target_zone) != finishedZones.end()) { + /* don't relay the message to the zone through more than one endpoint unless this is our own zone */ + if (finishedZones.find(target_zone) != finishedZones.end() && target_zone != my_zone) { skippedEndpoints.push_back(endpoint); continue; }