lichao
2021-05-21 330f78f3334bcdcdb4cc2ab2dbf66604e0224d71
src/topic_node.cpp
@@ -143,8 +143,14 @@
   for (auto &p : sockets_) { p->Stop(); }
}
bool TopicNode::Register(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms)
bool TopicNode::UniRegister(const bool internal, ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms)
{
   auto ValidUserProcId = [](const std::string &id) { return !id.empty() && id[0] != '#'; };
   if (!internal && !ValidUserProcId(proc.proc_id())) {
      SetLastError(eInvalidInput, "invalid proc id :'" + proc.proc_id() + "'");
      return false;
   }
   {
      std::lock_guard<std::mutex> lk(mutex_);
      info_ = proc;