mirror of https://github.com/Icinga/icinga2.git
Merge pull request #9810 from Icinga/Al2Klimov-patch-8
ElasticsearchWriter#Pause(): call Flush() only once
This commit is contained in:
commit
70d6b6e424
|
@ -118,10 +118,12 @@ void ElasticsearchWriter::Pause()
|
||||||
m_HandleNotifications.disconnect();
|
m_HandleNotifications.disconnect();
|
||||||
|
|
||||||
m_FlushTimer->Stop(true);
|
m_FlushTimer->Stop(true);
|
||||||
|
|
||||||
Flush();
|
|
||||||
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…
Reference in New Issue