Fix: Compat Log: abort on OwnLock()

Fixes #4332
This commit is contained in:
Gunnar Beutner 2013-06-24 08:56:13 +02:00
parent e983ced44b
commit ea0052f208
1 changed files with 13 additions and 3 deletions

View File

@ -156,7 +156,10 @@ void CompatLog::CheckResultRequestHandler(const RequestMessage& request)
<< attempt_after << ";"
<< "";
WriteLine(msgbuf.str());
{
ObjectLock olock(this);
WriteLine(msgbuf.str());
}
if (service == host->GetHostCheckService()) {
std::ostringstream msgbuf;
@ -167,10 +170,17 @@ void CompatLog::CheckResultRequestHandler(const RequestMessage& request)
<< attempt_after << ";"
<< "";
WriteLine(msgbuf.str());
{
ObjectLock olock(this);
WriteLine(msgbuf.str());
}
}
Flush();
{
ObjectLock olock(this);
Flush();
}
}
void CompatLog::WriteLine(const String& line)