From 32a8370517ce75caac836edc82f62614d5f9b187 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 23 十一月 2022 10:19:31 +0800
Subject: [PATCH] 科技系统优化、大华摄像头功能

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

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index ea5e472..383bda8 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -323,10 +323,12 @@
         /// </summary>
         public static async Task StartCloudMqtt()
         {
-            if (MainPage.InternetStatus == 0)
+            //娌℃湁缃戠粶鐨勭姸鎬佷笅灏濊瘯涓�涓嬭繛鎺qtt 锛屽畨鍗撶殑缃戠粶鐘舵�佸彉鍖栫洃鍚湁寮傚父锛屼慨鏀瑰簳灞傞夯鐑�
+            if (MainPage.InternetStatus == 0 && MainPage.LinkHdlMqttCount > 1)
             {
                 return;
             }
+            MainPage.LinkHdlMqttCount++;
 
             if (!UserInfo.Current.IsLogin)
             {
@@ -618,6 +620,10 @@
                         {
                             IfNeedReadAllDeviceStatus = true;
                             Control.Ins.GatewayOnline_Cloud = true;
+                            if(MainPage.InternetStatus == 0)
+                            {
+                                MainPage.InternetStatus = 1;
+                            }
                             Utlis.WriteLine($"============>Mqtt杩滅▼杩炴帴鎴愬姛");
                             SendPushSignOut();
                         });

--
Gitblit v1.8.0