Commit ae7815db by 郭峰

Merge branch 'feature/mqtt-feature' into 'release'

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

See merge request !20
parents 5d09006a 0d1cc66f
......@@ -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