Skip to content

Commit a00b2c0

Browse files
committed
fix bug preventing non-primitive msgs to be published
1 parent 2664022 commit a00b2c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/MqttClient.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,10 @@ void MqttClient::message_arrived(mqtt::const_message_ptr mqtt_msg) {
725725
// publish directly if primitive
726726
if (mqtt2ros_.count(mqtt_topic) > 0) {
727727
Mqtt2RosInterface& mqtt2ros = mqtt2ros_[mqtt_topic];
728-
if (mqtt2ros.primitive) mqtt2primitive(mqtt_msg);
729-
return;
728+
if (mqtt2ros.primitive) {
729+
mqtt2primitive(mqtt_msg);
730+
return;
731+
}
730732
}
731733

732734
// else first check for ROS message type

0 commit comments

Comments
 (0)