]> granicus.if.org Git - icinga2/commitdiff
cluster: Fix another reconnect bug.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 11 Sep 2013 08:21:43 +0000 (10:21 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 11 Sep 2013 08:21:43 +0000 (10:21 +0200)
components/cluster/clustercomponent.cpp

index 041d21805d7ccd298baaa79a26f8853e85a10f06..56ed854941c2edf64a91aafc25c8b5d31244a900 100644 (file)
@@ -411,6 +411,8 @@ void ClusterComponent::NewClientHandler(const Socket::Ptr& client, TlsRole role)
                return;
        }
 
+       endpoint->SetSeen(Utility::GetTime());
+
        Dictionary::Ptr config = boost::make_shared<Dictionary>();
        Array::Ptr configFiles = endpoint->GetConfigFiles();
 
@@ -469,7 +471,7 @@ void ClusterComponent::ClusterTimerHandler(void)
                ObjectLock olock(this);
                /* check if we've recently seen heartbeat messages from our peers */
                BOOST_FOREACH(const Endpoint::Ptr& endpoint, DynamicType::GetObjects<Endpoint>()) {
-                       if (!endpoint->IsConnected() || endpoint->GetSeen() > Utility::GetTime() - 60)
+                       if (endpoint->GetSeen() > Utility::GetTime() - 60)
                                continue;
 
                        Stream::Ptr client = endpoint->GetClient();