]> granicus.if.org Git - icinga2/commitdiff
cluster: Send SetLogPosition messages for all message types.
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 3 Sep 2013 09:14:51 +0000 (11:14 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 3 Sep 2013 09:14:51 +0000 (11:14 +0200)
components/cluster/clustercomponent.cpp

index 31efc8d17d770bed0d37b5234d897113934a6cbd..71f46ae482686520e155ac07c19d65a11732bafe 100644 (file)
@@ -676,11 +676,6 @@ void ClusterComponent::MessageHandler(const Endpoint::Ptr& sender, const Diction
 {
        RelayMessage(sender, message, true);
 
-       if (message->Get("method") == "cluster::HeartBeat") {
-               sender->SetSeen(Utility::GetTime());
-               return;
-       }
-
        if (sender->GetRemoteLogPosition() + 10 < message->Get("ts")) {
                Dictionary::Ptr lparams = boost::make_shared<Dictionary>();
                lparams->Set("log_position", message->Get("ts"));
@@ -695,6 +690,11 @@ void ClusterComponent::MessageHandler(const Endpoint::Ptr& sender, const Diction
                sender->SetRemoteLogPosition(message->Get("ts"));
        }
 
+       if (message->Get("method") == "cluster::HeartBeat") {
+               sender->SetSeen(Utility::GetTime());
+               return;
+       }
+
        Dictionary::Ptr params = message->Get("params");
 
        if (!params)