mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-23 09:48:05 +02:00
cluster: Fix crash bug.
This commit is contained in:
parent
b97e69604d
commit
1b31ced475
@ -215,6 +215,7 @@ void ClusterComponent::RelayMessage(const Endpoint::Ptr& except, const Dictionar
|
|||||||
pmessage->Set("message", message);
|
pmessage->Set("message", message);
|
||||||
|
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
|
if (m_LogFile) {
|
||||||
String json = Value(pmessage).Serialize();
|
String json = Value(pmessage).Serialize();
|
||||||
NetString::WriteStringToStream(m_LogFile, json);
|
NetString::WriteStringToStream(m_LogFile, json);
|
||||||
m_LogMessageCount++;
|
m_LogMessageCount++;
|
||||||
@ -225,6 +226,7 @@ void ClusterComponent::RelayMessage(const Endpoint::Ptr& except, const Dictionar
|
|||||||
OpenLogFile();
|
OpenLogFile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_FOREACH(const Endpoint::Ptr& endpoint, DynamicType::GetObjects<Endpoint>()) {
|
BOOST_FOREACH(const Endpoint::Ptr& endpoint, DynamicType::GetObjects<Endpoint>()) {
|
||||||
if (!persistent && !endpoint->IsConnected())
|
if (!persistent && !endpoint->IsConnected())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user