From bcd780993c176b93f7393607f8003adf66e6676a Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期一, 26 四月 2021 10:27:14 +0800
Subject: [PATCH] fix node default ignore msg.

---
 src/topic_node.cpp |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/topic_node.cpp b/src/topic_node.cpp
index 13bb8ee..1131816 100644
--- a/src/topic_node.cpp
+++ b/src/topic_node.cpp
@@ -44,9 +44,10 @@
 	}
 	// recv msgs to avoid memory leak.
 	auto default_ignore_msg = [](ShmSocket &sock, MsgI &imsg, BHMsgHead &head) { return true; };
-	for (auto &p : sockets_) {
-		p->Start(default_ignore_msg);
-	}
+	SockNode().Start(default_ignore_msg);
+	// for (auto &p : sockets_) {
+	// 	p->Start(default_ignore_msg);
+	// }
 }
 
 TopicNode::~TopicNode()
@@ -388,6 +389,7 @@
 
 		BHAddress addr;
 		if (ClientQueryRPCTopic(request.topic(), addr, timeout_ms)) {
+			printf("node: %ld, topic dest: %ld\n", SockNode().id(), addr.mq_id());
 			BHMsgHead head(InitMsgHead(GetType(request), proc_id(), ssn()));
 			AddRoute(head, sock.id());
 			head.set_topic(request.topic());

--
Gitblit v1.8.0