From 34cd75f77d0ca94dbdba4e6cc9451fe4d33e78b3 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期三, 19 五月 2021 19:14:13 +0800
Subject: [PATCH] add api BHQueryProcs.

---
 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