mirror of https://github.com/Icinga/icinga2.git
Fix: Cluster log files were not properly removed when an instance has no peers.
This commit is contained in:
parent
5495b0279e
commit
e391fc0858
|
@ -519,9 +519,7 @@ void ClusterComponent::ClusterTimerHandler(void)
|
|||
|
||||
Array::Ptr peers = GetPeers();
|
||||
|
||||
if (!peers)
|
||||
return;
|
||||
|
||||
if (peers) {
|
||||
ObjectLock olock(peers);
|
||||
BOOST_FOREACH(const String& peer, peers) {
|
||||
Endpoint::Ptr endpoint = Endpoint::GetByName(peer);
|
||||
|
@ -555,6 +553,7 @@ void ClusterComponent::ClusterTimerHandler(void)
|
|||
Log(LogWarning, "cluster", msgbuf.str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<int> files;
|
||||
Utility::Glob(GetClusterDir() + "log/*", boost::bind(&ClusterComponent::LogGlobHandler, boost::ref(files), _1));
|
||||
|
|
Loading…
Reference in New Issue