wxr
2023-11-06 6a8eb1ce9d8e34c50164a4e24e7098e681ee08b6
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -111,7 +111,7 @@
            {
                MqttInfoConfig.Current.IfGetMqttInfoSuccess = false;
            }
            Control.Ins.GatewayOnline_Cloud = Control.Ins.GatewayOnline_Local = false;
            //Control.Ins.GatewayOnline_Cloud = Control.Ins.GatewayOnline_Local = false;
            await DisConnectRemoteMqttClient(s);
        }
@@ -133,10 +133,6 @@
            new System.Threading.Thread(async () => {
                while (true)
                {
                    if (!UserInfo.Current.IsLogin)
                    {
                        return;
                    }
                    try
                    {
                        System.Threading.Thread.Sleep(2000);
@@ -149,6 +145,7 @@
                        await StartCloudMqtt();
                        await SubscribeTopics();
                    }
                    catch { }
                }
@@ -553,7 +550,7 @@
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
                                    MainPage.Log($"mqtt 状态更新:{revString}");
                                    //MainPage.Log($"mqtt 状态更新:{revString}");
                                    Control.Ins.UpdataFunctionStatus(revString, null, true);
                                    //Control.Ins.MsgInfoList.Add($"mqtt 状态更新:{revString}");
                                    //Control.Ins.MsgInfoList.Add(revString + "\r\n");
@@ -984,7 +981,7 @@
                MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj;
                await MQTTConnectAsync();
                //await MQTTConnectAsync();
                //1.判断是否绑定了网关,获取网关远程连接的加密KEY
                //if (DB_ResidenceData.Instance.CheckWhetherGatewayIsBound())
                {