lichao
2021-05-21 1c92e4cbc85f9501660444cb76ebb06770da9376
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;