cluster: Fix crash bug.

This commit is contained in:
Gunnar Beutner 2013-09-03 11:00:57 +02:00
parent b97e69604d
commit 1b31ced475

View File

@ -215,6 +215,7 @@ void ClusterComponent::RelayMessage(const Endpoint::Ptr& except, const Dictionar
pmessage->Set("message", message);
ObjectLock olock(this);
if (m_LogFile) {
String json = Value(pmessage).Serialize();
NetString::WriteStringToStream(m_LogFile, json);
m_LogMessageCount++;
@ -225,6 +226,7 @@ void ClusterComponent::RelayMessage(const Endpoint::Ptr& except, const Dictionar
OpenLogFile();
}
}
}
BOOST_FOREACH(const Endpoint::Ptr& endpoint, DynamicType::GetObjects<Endpoint>()) {
if (!persistent && !endpoint->IsConnected())