added mutex
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled

This commit is contained in:
wt committed 2025-04-18 15:47:36 +07:00
1 parent e74ab7a560
commit e6ec1527da
8 files changed
+36 -18

No files matched your search

+1
View File
@@ -33,6 +33,7 @@ void get_all_users(const httplib::Request& request, httplib::Response& response)
syslog(LOG_ERR, "access reject in get all user request");
return;
}
std::lock_guard<std::mutex> lock(usersfilemutex);
std::ifstream usersfile(USERS_FILE);
nlohmann::json all_users = nlohmann::json::parse(usersfile);
usersfile.close();