From b2484c8bd77a9d21bcf1827f554444535196953d Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期五, 21 五月 2021 10:47:18 +0800
Subject: [PATCH] center save shm on each node, no bind to shm.

---
 box/center.cpp |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/box/center.cpp b/box/center.cpp
index 3f565b1..e77c38f 100644
--- a/box/center.cpp
+++ b/box/center.cpp
@@ -165,15 +165,8 @@
 
 BHCenter::BHCenter(Socket::Shm &shm)
 {
-	auto gc = [&](const MQId id) {
-		auto r = ShmSocket::Remove(shm, id);
-		if (r) {
-			LOG_DEBUG() << "remove mq " << id << " ok\n";
-		}
-	};
-
 	auto nsec = NodeTimeoutSec();
-	auto center_ptr = std::make_shared<Synced<NodeCenter>>("#bhome_center", gc, nsec, nsec * 3); // *3 to allow other clients to finish sending msgs.
+	auto center_ptr = std::make_shared<Synced<NodeCenter>>("#bhome_center", nsec, nsec * 3); // *3 to allow other clients to finish sending msgs.
 	AddCenter(center_ptr);
 
 	for (auto &kv : Centers()) {

--
Gitblit v1.8.0