From a8f8443c3aa4cf6e643cdbadbff86a7d09755ab0 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期四, 20 五月 2021 09:41:03 +0800
Subject: [PATCH] rebuild proto

---
 src/defs.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/defs.cpp b/src/defs.cpp
index 43e7b7f..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;
 	}
@@ -187,4 +187,6 @@
 {
 	ec = LastErrorStore().ec_;
 	msg = LastErrorStore().msg_;
-}
\ No newline at end of file
+}
+
+int NodeTimeoutSec() { return 60; }
\ No newline at end of file

--
Gitblit v1.8.0