mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
Revert "Revert "cluster: Disconnect timed out endpoints.""
This reverts commit 0cab8827311db265a8458236ef97b3f9640e9ca8.
This commit is contained in:
parent
b95d0d3264
commit
b9ef225420
@ -450,6 +450,17 @@ void ClusterComponent::ClusterTimerHandler(void)
|
||||
|
||||
RelayMessage(Endpoint::Ptr(), message, false);
|
||||
|
||||
/* 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)
|
||||
continue;
|
||||
|
||||
Stream::Ptr client = endpoint->GetClient();
|
||||
|
||||
if (client)
|
||||
client->Close();
|
||||
}
|
||||
|
||||
Array::Ptr peers = GetPeers();
|
||||
|
||||
if (!peers)
|
||||
|
Loading…
x
Reference in New Issue
Block a user