From 7e94d0d0dcb7eae298d0bbb4221c970037448c9f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 02 十一月 2023 16:22:52 +0800
Subject: [PATCH] 修复首次登录mqtt无法订阅的问题

---
 HDL_ON/DAL/Mqtt/MqttClient.cs |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 51866d6..4353a7f 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -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 { }
                 }
@@ -984,7 +981,7 @@
 
 
                 MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj;
-                await MQTTConnectAsync();
+                //await MQTTConnectAsync();
                 //1.鍒ゆ柇鏄惁缁戝畾浜嗙綉鍏筹紝鑾峰彇缃戝叧杩滅▼杩炴帴鐨勫姞瀵咾EY
                 //if (DB_ResidenceData.Instance.CheckWhetherGatewayIsBound())
                 {

--
Gitblit v1.8.0