From 780e34b3f06f9709150183711ffddd19f97e070d Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 25 十二月 2020 10:11:19 +0800 Subject: [PATCH] 20201225-3 --- 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 index f61aa02..7dee091 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -160,6 +160,10 @@ } static bool isSubscribeSuccess; + /// <summary> + /// 璁㈤槄涓婚 + /// </summary> + /// <returns></returns> static async Task SubscribeTopics() { if (remoteIsConnected && !isSubscribeSuccess) @@ -659,7 +663,17 @@ if (Control.Ins.IsRemote) { if (!Control.Ins.GatewayOnline) - Control.Ins.GatewayOnline = true; + { + try + { + if (DB_ResidenceData.Instance.HomeGateway != null) + { + DB_ResidenceData.Instance.HomeGateway.gatewayStatus = true; + } + Control.Ins.GatewayOnline = true; + } + catch { } + } } } -- Gitblit v1.8.0