From cdd3961550713da196a6e369dfa7c5617ff1d9dc Mon Sep 17 00:00:00 2001 From: cxh Date: Tue, 9 Sep 2025 14:00:50 +0800 Subject: [PATCH] first commit --- src/mqtt_client_wrapper.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mqtt_client_wrapper.cpp b/src/mqtt_client_wrapper.cpp index 8adc0b0..ab0c033 100644 --- a/src/mqtt_client_wrapper.cpp +++ b/src/mqtt_client_wrapper.cpp @@ -93,8 +93,11 @@ static void on_mqtt_message_received(const std::string &topic, const std::string reply["seqNo"] = seqNo; // 发送应答 - MQTTClientWrapper::publish(g_app_config.mqtt.topics.substream_down_ack, reply.dump()); - LOG_INFO("[MQTT] Replied to video_down: " + reply.dump()); + if (mqtt_client) + { + mqtt_client->publish(g_app_config.mqtt.topics.substream_down_ack, reply.dump()); + LOG_INFO("[MQTT] Replied to video_down: " + reply.dump()); + } } else if (topic == g_app_config.mqtt.topics.substream_down) {