wxr
2023-07-14 002e48d8baa60c8d38ba95d65cd73118ab8cdb09
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -110,6 +110,7 @@
            {
                MqttInfoConfig.Current.IfGetMqttInfoSuccess = false;
            }
            Control.Ins.GatewayOnline_Cloud = Control.Ins.GatewayOnline_Local = false;
            await DisConnectRemoteMqttClient(s);
        }
@@ -159,7 +160,7 @@
            StartCloudMqtt();
        }
        static bool isSubscribeSuccess;
        public static bool isSubscribeSuccess;
        /// <summary>
        /// 订阅主题
        /// </summary>
@@ -261,8 +262,8 @@
                    #endregion
                    Utlis.WriteLine("开始订阅!");
                    var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] {
                    Utlis.WriteLine("开始订阅!");
                     var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] {
                        pirStatus,pirStudy,
                        appDeviceRefresh,appHomeRefresh,appRoomRefresh,residenceChange,
                        topicFilterPush2, topicAlinkStatus ,mqttkeyChange,
@@ -374,7 +375,7 @@
                            try
                            {
                                var topic = e.ApplicationMessage.Topic;
                                //MainPage.Log($"收到mqtt主题:{topic}");
                                MainPage.Log($"收到mqtt主题:{topic}");
                                //一端口主题处理
                                if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
                                {
@@ -460,6 +461,7 @@
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up")
                                {
                                    MainPage.Log("住宅数据刷新通知");
                                    System.Threading.Thread.Sleep(2000);
                                    new HttpServerRequest().GetHomePager();
                                }
                                //appRoomRefresh:房间数据刷新通知
@@ -682,7 +684,7 @@
                }
                catch (Exception ex)
                {
                    Utlis.WriteLine($"error:" + ex.Message);
                    Utlis.WriteLine($"mqtt连接异常 error:" + ex.Message);
                    //mqtt连接异常,清空本地mqtt信息,可能需要重新获取:wxr
                    MqttInfoConfig.Current.Refresh();
                }
@@ -870,7 +872,7 @@
        static void ReceiveNotifySqueezeAsync(string mMes)
        {
#if DEBUG
            return;
            //return;
#endif
            if (mMes == PushSignStr) return;//是自己的登录推送不处理//或者当前不是远程链接状态
            //测试账号,不挤下线