mirror of https://github.com/Icinga/icinga2.git
ElasticsearchWriter#Pause(): lock m_DataBufferMutex during Flush()
just to be sure regarding race conditions.
This commit is contained in:
parent
d5e6ecec8a
commit
076eb59443
|
@ -119,7 +119,11 @@ void ElasticsearchWriter::Pause()
|
|||
|
||||
m_FlushTimer->Stop(true);
|
||||
m_WorkQueue.Join();
|
||||
Flush();
|
||||
|
||||
{
|
||||
std::unique_lock<std::mutex> lock (m_DataBufferMutex);
|
||||
Flush();
|
||||
}
|
||||
|
||||
Log(LogInformation, "ElasticsearchWriter")
|
||||
<< "'" << GetName() << "' paused.";
|
||||
|
|
Loading…
Reference in New Issue