From 4ad4f24f18cf7d0af22ca885baebc6a3eb37e7d0 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期四, 20 五月 2021 10:08:40 +0800 Subject: [PATCH] rename socket.h/cpp to shm_socket.h/cpp. --- src/defs.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/defs.cpp b/src/defs.cpp index 43e7b7f..2715911 100644 --- a/src/defs.cpp +++ b/src/defs.cpp @@ -18,7 +18,7 @@ #include "defs.h" #include "msg.h" #include "shm_msg_queue.h" -#include "socket.h" +#include "shm_socket.h" #include <boost/uuid/random_generator.hpp> #include <boost/uuid/string_generator.hpp> #include <boost/uuid/uuid.hpp> @@ -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