From: Gunnar Beutner Date: Wed, 11 Sep 2013 08:21:43 +0000 (+0200) Subject: cluster: Fix another reconnect bug. X-Git-Tag: v0.0.3~561 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9b7cfb7770e3e224588dd6164d91843a269a82a;p=icinga2 cluster: Fix another reconnect bug. --- diff --git a/components/cluster/clustercomponent.cpp b/components/cluster/clustercomponent.cpp index 041d21805..56ed85494 100644 --- a/components/cluster/clustercomponent.cpp +++ b/components/cluster/clustercomponent.cpp @@ -411,6 +411,8 @@ void ClusterComponent::NewClientHandler(const Socket::Ptr& client, TlsRole role) return; } + endpoint->SetSeen(Utility::GetTime()); + Dictionary::Ptr config = boost::make_shared(); 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()) { - if (!endpoint->IsConnected() || endpoint->GetSeen() > Utility::GetTime() - 60) + if (endpoint->GetSeen() > Utility::GetTime() - 60) continue; Stream::Ptr client = endpoint->GetClient();