Added mutex to prevent config corruption #3817

This commit is contained in:
Dmitry K 2023-12-30 17:57:01 +00:00 committed by Adam Honse
parent 252e067271
commit 869e9cb0fc
2 changed files with 45 additions and 28 deletions

View file

@ -12,6 +12,7 @@
#pragma once
#include "json.hpp"
#include <mutex>
#include "filesystem.h"
using json = nlohmann::json;
@ -45,4 +46,6 @@ private:
json settings_data;
json settings_prototype;
filesystem::path settings_filename;
std::mutex mutex;
bool config_found;
};