Commit 0d1cc66f by “liusq”

mqtt断线重连,配置修改重新创建连接05

parent 8d2f98e7
......@@ -100,7 +100,7 @@ void MqttSubscriber::reconnectAndFetchConfig() {
// 使用 HttpService 从远程云端拉取配置
HttpService httpService(httpUrl); // 替换为实际的远程URL
vides_data::response *res = httpService.httpDeviceConfig(serialNumber,re_config);
if (res->code != 0) {
if (res->code == 0) {
instace.deleteObj(res);
re_config.mqttConfig.clientId=serialNumber;
QString topic = QStringLiteral("/thingshub/%1/device/reply").arg(serialNumber);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment