From bb6ad792b598927a5459a5fb6f6c27fb1aa9e94e Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期四, 17 十二月 2020 14:06:36 +0800 Subject: [PATCH] 20201217-1 --- HDL_ON/DAL/Mqtt/MqttClient.cs | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index 77f4d6b..b9b58d5 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -310,11 +310,27 @@ if (RemoteMqttClient.ConnectedHandler == null) { RemoteMqttClient.UseConnectedHandler(async (e) => { - Control.Ins.GatewayOnline = true; + 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(); - //FunctionList.List.ReadAllFunctionStatus(); }); } #endregion -- Gitblit v1.8.0