From d9338a1defea49b1173640b0d637ebd6e89ab14e Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 18 十二月 2020 19:49:26 +0800 Subject: [PATCH] 20201218-5 --- HDL_ON/DAL/Mqtt/MqttClient.cs | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs old mode 100644 new mode 100755 index 7a0d4ff..4ddfc8e --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -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