ElasticsearchWriter#Pause(): call Flush() only once

The first Flush() is redundant and may access m_DataBuffer at the same time as some Flush() in m_WorkQueue (race condition) which isn't joined, yet.
This commit is contained in:
Alexander Aleksandrovič Klimov 2023-06-29 10:42:12 +02:00 committed by Alexander A. Klimov
parent 02ddb4badc
commit 73f8c4473e

View File

@ -117,7 +117,6 @@ void ElasticsearchWriter::Pause()
m_HandleStateChanges.disconnect();
m_HandleNotifications.disconnect();
Flush();
m_WorkQueue.Join();
Flush();