mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
ElasticsearchWriter#Pause(): lock m_DataBufferMutex during Flush()
just to be sure regarding race conditions.
This commit is contained in:
parent
73f8c4473e
commit
8dca4d7121
@ -118,7 +118,11 @@ void ElasticsearchWriter::Pause()
|
||||
m_HandleNotifications.disconnect();
|
||||
|
||||
m_WorkQueue.Join();
|
||||
Flush();
|
||||
|
||||
{
|
||||
std::unique_lock<std::mutex> lock (m_DataBufferMutex);
|
||||
Flush();
|
||||
}
|
||||
|
||||
Log(LogInformation, "ElasticsearchWriter")
|
||||
<< "'" << GetName() << "' paused.";
|
||||
|
Loading…
x
Reference in New Issue
Block a user