Merge pull request #6815 from Icinga/bugfix/reload-while-api-dos

ThreadPool#Stop(): discard non-processed queue items
This commit is contained in:
Michael Friedrich 2018-12-05 11:11:49 +01:00 committed by GitHub
commit 08c1539561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,7 @@ void ThreadPool::Stop()
for (auto& queue : m_Queues) {
boost::mutex::scoped_lock lock(queue.Mutex);
queue.Stopped = true;
queue.Items.clear();
queue.CV.notify_all();
}