From 5a5a2b696866f947b6025d26c3302e8ffef46435 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 11 一月 2021 16:11:20 +0800 Subject: [PATCH] 2021-01-11 1.更新MQTT连接和本地搜索网关方法。2.子账号相关接口完善 --- Crabtree/ON.Ios/AppDelegate.cs | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Crabtree/ON.Ios/AppDelegate.cs b/Crabtree/ON.Ios/AppDelegate.cs index 6f6ac77..884f733 100644 --- a/Crabtree/ON.Ios/AppDelegate.cs +++ b/Crabtree/ON.Ios/AppDelegate.cs @@ -7,6 +7,7 @@ using Microsoft.AppCenter.Crashes; using Shared; using Shared.SimpleControl; +using SmartHome; using UIKit; using UserNotifications; @@ -263,6 +264,8 @@ /// </summary> void BusSocketStop () { + //杩涘叆鍚庡彴mqtt姝e湪杩炴帴閲嶇疆鐘舵�� + MqttCommon.remoteMqttIsConnecting = false; Shared.BusSocket.Stop (); closeTime = DateTime.Now; } @@ -273,20 +276,13 @@ /// </summary> void BusSocketStart () { - if (closeTime == DateTime.MinValue) { closeTime = DateTime.Now; - } else if (closeTime.AddSeconds (20) < DateTime.Now) { + } else if (closeTime.AddSeconds (10) < DateTime.Now) { if (CommonPage.IsRemote) { - SmartHome.MqttCommon.DisConnectRemoteMqttClient ("closeTime"); + MqttCommon.DisConnectRemote ("closeTime", false); } } - - //if (closeTime == DateTime.MinValue) { - // closeTime = DateTime.Now; - //} else if (closeTime.AddMinutes (2) > DateTime.Now) { - // // MqttCommon.DisConnectRemoteMqttClient (); - //} var netStatus = (int)Reachability.InternetConnectionStatus (); //鏈変簺绯荤粺鐗堟湰杩欓噷鍚姩姣旇鍥炬帶鍒跺櫒蹇� @@ -316,7 +312,8 @@ if (SmartHome.WiFiSet.refreshView != null) { SmartHome.WiFiSet.refreshView (); } - + if (netStatus == 0) + return; } } } \ No newline at end of file -- Gitblit v1.8.0