]> granicus.if.org Git - icinga2/commitdiff
Fix: ApiListener::SyncRelayMessage doesn't send message to all zone members
authorGunnar Beutner <gunnar@beutner.name>
Thu, 15 Oct 2015 07:28:20 +0000 (09:28 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 15 Oct 2015 09:59:57 +0000 (11:59 +0200)
fixes #10365

lib/remote/apilistener.cpp

index 7e1e3c52cef904ce9869033cf0cb2040632c1b1c..524438a1bcba28a93d43aa3621145e500691b543 100644 (file)
@@ -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;
                }