mirror of https://github.com/Icinga/icinga2.git
Cluster: Don't try to sync objects from broken _api package
This commit is contained in:
parent
0d6d48fd59
commit
f92c134b0a
|
@ -282,7 +282,15 @@ void ApiListener::UpdateConfigObject(const ConfigObject::Ptr& object, const Mess
|
|||
params->Set("version", object->GetVersion());
|
||||
|
||||
if (object->GetPackage() == "_api") {
|
||||
String file = ConfigObjectUtility::GetObjectConfigPath(object->GetReflectionType(), object->GetName());
|
||||
String file;
|
||||
|
||||
try {
|
||||
file = ConfigObjectUtility::GetObjectConfigPath(object->GetReflectionType(), object->GetName());
|
||||
} catch (const std::exception& ex) {
|
||||
Log(LogNotice, "ApiListener")
|
||||
<< "Cannot sync object '" << object->GetName() << "': " << ex.what();
|
||||
return;
|
||||
}
|
||||
|
||||
std::ifstream fp(file.CStr(), std::ifstream::binary);
|
||||
if (!fp)
|
||||
|
|
Loading…
Reference in New Issue