[feat] lock the cache file when write/read it

This commit is contained in:
dijunkun
2024-08-08 15:24:54 +08:00
parent f77e9fe6a8
commit a05d72ec67
2 changed files with 7 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ class Render {
static void OnConnectionStatusCb(ConnectionStatus status, void *user_data);
static void NetStatusReport(int TransmissionId, TraversalMode mode,
static void NetStatusReport(int client_id, TraversalMode mode,
const unsigned short send,
const unsigned short receive, void *user_data);
@@ -101,6 +101,7 @@ class Render {
private:
FILE *cd_cache_file_ = nullptr;
CDCache cd_cache_;
std::mutex cd_cache_mutex_;
ConfigCenter config_center_;