Skip to content

Commit

Permalink
fix TopicSubscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Apr 19, 2024
1 parent 13682b4 commit bdb778a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,14 @@ template<class T> inline
std::string topic_name;
getInput("topic_name", topic_name);

if(!sub_instance_)
if(!topic_name.empty() && topic_name != "__default__placeholder__" && topic_name != topic_name_)
{
createSubscriber(topic_name);
sub_instance_.reset();
}
else if(topic_name_ != topic_name)

if(!sub_instance_)
{
sub_instance_.reset();
createSubscriber(topic_name);
createSubscriber(topic_name);
}

auto CheckStatus = [](NodeStatus status)
Expand Down

0 comments on commit bdb778a

Please sign in to comment.