mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
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_FlushTimer->Stop(true);
|
||||||
m_WorkQueue.Join();
|
m_WorkQueue.Join();
|
||||||
Flush();
|
|
||||||
|
{
|
||||||
|
std::unique_lock<std::mutex> lock (m_DataBufferMutex);
|
||||||
|
Flush();
|
||||||
|
}
|
||||||
|
|
||||||
Log(LogInformation, "ElasticsearchWriter")
|
Log(LogInformation, "ElasticsearchWriter")
|
||||||
<< "'" << GetName() << "' paused.";
|
<< "'" << GetName() << "' paused.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user