]> granicus.if.org Git - icinga2/commitdiff
cluster: Prevent idle timeout during log replay.
authorGunnar Beutner <gunnar@beutner.name>
Wed, 11 Sep 2013 15:07:07 +0000 (17:07 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 11 Sep 2013 15:07:07 +0000 (17:07 +0200)
components/cluster/clustercomponent.cpp

index 56ed854941c2edf64a91aafc25c8b5d31244a900..b170f48eeed63576f59c6b4cd68d9f19eb4a96e8 100644 (file)
@@ -806,6 +806,8 @@ void ClusterComponent::AcknowledgementClearedHandler(const Service::Ptr& service
 
 void ClusterComponent::MessageHandler(const Endpoint::Ptr& sender, const Dictionary::Ptr& message)
 {
+       sender->SetSeen(Utility::GetTime());
+
        if (message->Contains("ts")) {
                double ts = message->Get("ts");
 
@@ -838,13 +840,11 @@ void ClusterComponent::MessageHandler(const Endpoint::Ptr& sender, const Diction
                return;
 
        if (message->Get("method") == "cluster::HeartBeat") {
-               sender->SetSeen(Utility::GetTime());
-
                String identity = params->Get("identity");
 
                Endpoint::Ptr endpoint = Endpoint::GetByName(identity);
 
-               if (endpoint && endpoint != sender)
+               if (endpoint)
                        endpoint->SetSeen(Utility::GetTime());
        } else if (message->Get("method") == "cluster::CheckResult") {
                String svc = params->Get("service");