mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
cluster: Disconnect timed out endpoints.
This commit is contained in:
parent
558daf7b84
commit
1f74139ab4
@ -410,6 +410,17 @@ void ClusterComponent::ClusterTimerHandler(void)
|
|||||||
|
|
||||||
RelayMessage(Endpoint::Ptr(), message, false);
|
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();
|
Array::Ptr peers = GetPeers();
|
||||||
|
|
||||||
if (!peers)
|
if (!peers)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user