From cf05ea3d9f43e4e84d621e1f9d54cbef552b6e2b Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期二, 18 五月 2021 16:53:28 +0800
Subject: [PATCH] fix center init mutex.
---
src/defs.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/defs.cpp b/src/defs.cpp
index cb85db7..0d9efc1 100644
--- a/src/defs.cpp
+++ b/src/defs.cpp
@@ -104,7 +104,7 @@
// which node might crash inside and cause deadlock.
bool CenterInit(bhome_shm::SharedMemory &shm)
{
- Mutex *mutex = shm.Create<Mutex>("shm_center_lock");
+ Mutex *mutex = shm.FindOrCreate<Mutex>("shm_center_lock");
if (!mutex || !mutex->try_lock()) {
return false;
}
--
Gitblit v1.8.0