From 54c202bd4867092fca2bc6f96bec0cfd1056a46a Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期一, 06 十一月 2023 11:24:20 +0800
Subject: [PATCH] 2023年11月06日11:23:46

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

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index f4e129f..51866d6 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/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,6 +133,10 @@
             new System.Threading.Thread(async () => {
                 while (true)
                 {
+                    if (!UserInfo.Current.IsLogin)
+                    {
+                        return;
+                    }
                     try
                     {
                         System.Threading.Thread.Sleep(2000);
@@ -549,7 +553,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");

--
Gitblit v1.8.0