From 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 19 十一月 2020 10:23:45 +0800 Subject: [PATCH] Evoyo.Home1.1.0120111601_Release --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs old mode 100644 new mode 100755 index 9fadede..2b14197 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs @@ -164,8 +164,8 @@ /// 鍙樻洿缃戠粶鏃剁殑浜嬩欢 /// </summary> private string changedNetworkTime = string.Empty; - /// <summary> - /// 褰撳墠 wifi 鐨� + /// <summary> + /// 褰撳墠 wifi 鐨� /// </summary> private string oldSsid = string.Empty; @@ -185,6 +185,7 @@ tcpClient = new System.Net.Sockets.TcpClient(); tcpClient.Connect("192.168.8.1", 5000); networkStream = tcpClient.GetStream(); + networkStream.ReadTimeout = 1000; //鍔犲瘑鏁版嵁 string sendDataMsg = "hdl1985."; string DefaultdesKey = "hdl1985."; @@ -379,22 +380,22 @@ /// <param name="value">0:娌℃湁缃戠粶 1:4G 2:wifi</param> public void NetworkStateChanged(int value) { - if(Common.Config.Instance.HomeId==string.Empty) - { - //鍦ㄧ櫥褰曠晫闈笉澶勭悊 - return; - } + if (Common.Config.Instance.HomeId == string.Empty) + { + //鍦ㄧ櫥褰曠晫闈笉澶勭悊 + return; + } #if iOS var nowSsid = this.SSID; - if (this.oldSsid == nowSsid) - { - //濡傛灉褰撳墠 wifi 鐨勫悕瀛椾竴鏍凤紝鍒欎笉澶勭悊 - return; + if (this.oldSsid == nowSsid) + { + //濡傛灉褰撳墠 wifi 鐨勫悕瀛椾竴鏍凤紝鍒欎笉澶勭悊 + ZigBee.Common.Application.FindGateWaySocket.Start(); + return; } - this.oldSsid = nowSsid; + this.oldSsid = nowSsid; #endif - - //娌℃湁缃戠粶 + //娌℃湁缃戠粶 if (value == 0) { this.CanAccessHttp = false; @@ -435,7 +436,7 @@ //鏂帀鏈湴杩炴帴 HdlGatewayLogic.Current.ClearAllRealGatewayConection(true); //鏂帀杩滅▼ - ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient(); + ZigBee.Device.ZbGateway.CloseRemoteConnectionOnForce(); //濡傛灉鏄痺ifi if (value == 2) -- Gitblit v1.8.0