Commit 2175b008 authored by David Schury's avatar David Schury

Fixed thread unsafe flush method.

parent e12c50a8
...@@ -60,6 +60,7 @@ protected: ...@@ -60,6 +60,7 @@ protected:
public: public:
void flush() override void flush() override
{ {
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
for (auto iter = _sinks.begin(); iter != _sinks.end(); iter++) for (auto iter = _sinks.begin(); iter != _sinks.end(); iter++)
(*iter)->flush(); (*iter)->flush();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment