IcingaDB#UpdateAllConfigObjects(): don't modify map concurrently

This commit is contained in:
Alexander A. Klimov 2021-03-08 18:11:24 +01:00
parent a4cf81194a
commit 31dacb8390
1 changed files with 2 additions and 2 deletions

View File

@ -367,9 +367,9 @@ void IcingaDB::UpdateAllConfigObjects()
std::map<String, std::map<String, String>> ourContent;
for (auto& source : ourContentRaw) {
upqObjectType.Enqueue([&]() {
auto& dest (ourContent[source.first]);
auto& dest (ourContent[source.first]);
upqObjectType.Enqueue([&]() {
for (auto& hMSet : source.second) {
for (decltype(hMSet.size()) i = 0, stop = hMSet.size() - 1u; i < stop; i += 2u) {
dest.emplace(std::move(hMSet[i]), std::move(hMSet[i + 1u]));