From 903b27f875e5f2a872c1b309f354b18c0450f35a Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期五, 04 六月 2021 11:46:18 +0800 Subject: [PATCH] allow tcp request with no dest, auto query topic. --- src/topic_node.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/topic_node.cpp b/src/topic_node.cpp index b21f7ef..5362318 100644 --- a/src/topic_node.cpp +++ b/src/topic_node.cpp @@ -50,8 +50,8 @@ } // namespace -TopicNode::TopicNode(SharedMemory &shm) : - shm_(shm), state_(eStateUninited) +TopicNode::TopicNode(SharedMemory &shm, MQId ssn_id) : + shm_(shm), state_(eStateUninited), ssn_id_(ssn_id) { } @@ -569,7 +569,8 @@ reply_head.mutable_proc_id()->swap(out_proc_id); return true; } - } catch (...) { + } catch (std::exception &e) { + LOG_ERROR() << __func__ << " exception: " << e.what(); SetLastError(eError, __func__ + std::string(" internal errer.")); } return false; @@ -672,7 +673,6 @@ reply.ParseBody(reply_body) && IsSuccess(reply_body.errmsg().errcode()); } - // TODO wait for result? } catch (...) { return false; } @@ -718,12 +718,12 @@ return false; } } - //TODO error msg. if (head.type() == kMsgTypePublish) { if (pub.ParseFromString(body)) { head.mutable_proc_id()->swap(proc_id); return true; } } + SetLastError(eError, "invalid subcribe msg received."); return false; } \ No newline at end of file -- Gitblit v1.8.0