Skip to content

Commit

Permalink
fix: 修复之前没有打补丁编译fastrtps, 导致cyber pub/sub订阅不到消息的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
minhanghuang committed May 7, 2022
1 parent 9747666 commit c689acb
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions cyber/service_discovery/specific_manager/manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,36 +186,13 @@ void Manager::Convert(const RoleAttributes& attr, RoleType role,
void Manager::Notify(const ChangeMsg& msg) { signal_(msg); }

void Manager::OnRemoteChange(const std::string& msg_str) {
// if (is_shutdown_.load()) {
// ADEBUG << "the manager has been shut down.";
// return;
// }

// ChangeMsg msg;
// RETURN_IF(!message::ParseFromString(msg_str, &msg));
// if (IsFromSameProcess(msg)) {
// return;
// }
// RETURN_IF(!Check(msg.role_attr()));
// Dispose(msg);

// TODO: 不修改这里,订阅不到消息
// https://github.com/ApolloAuto/apollo/issues/7749#issuecomment-481939116
if (is_shutdown_.load()) {
ADEBUG << "the manager has been shut down.";
return;
}

ChangeMsg msg;
// RETURN_IF(!message::ParseFromString(msg_str, &msg));
if (message::HasParseFromString<ChangeMsg>::value) {
msg.ParseFromString(msg_str);
}
else {
AWARN << "HasParseFromString<ChangeMsg> is not met.";
return;
}

RETURN_IF(!message::ParseFromString(msg_str, &msg));
if (IsFromSameProcess(msg)) {
return;
}
Expand Down

0 comments on commit c689acb

Please sign in to comment.