From 3246b9db47308cc809df595a5cb704fc82c96439 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 17 十二月 2020 16:18:48 +0800
Subject: [PATCH] Merge branch 'NewFilePath' into CJL

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

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 1e1e716..4ddfc8e 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -289,7 +289,7 @@
                                     {
                                         //A鍗忚鏁版嵁澶勭悊
                                         var revString = Encoding.UTF8.GetString(bytes);
-                                        Control.Ins.UpdataFunctionStatus(revString);
+                                        Control.Ins.UpdataFunctionStatus(revString,null);
                                     }
                                 }
                             }
@@ -310,10 +310,24 @@
                     if (RemoteMqttClient.ConnectedHandler == null)
                     {
                         RemoteMqttClient.UseConnectedHandler(async (e) => {
-                            if (DB_ResidenceData.Instance.HomeGateway.GatewayOnline)
+                            if (DB_ResidenceData.Instance.HomeGateway.gatewayStatus)
                             {
                                 Control.Ins.GatewayOnline = true;
                             }
+                            else
+                            {
+                                //new System.Threading.Thread(() => {
+                                //    while(true)
+                                //    {
+                                //        System.Threading.Thread.Sleep(1000);
+                                //        if (DB_ResidenceData.Instance.HomeGateway.GatewayOnline)
+                                //        {
+                                //            Control.Ins.GatewayOnline = true;
+                                //            break;
+                                //        }
+                                //    }
+                                //}) { IsBackground = true }.Start();
+                            }
                             IfNeedReadAllDeviceStatus = true;
                             Utlis.WriteLine($"============>Mqtt杩滅▼杩炴帴鎴愬姛");
                             SendPushSignOut();

--
Gitblit v1.8.0