From d099a65ce3f5f8ed9ba345f8f3bdcf617fa4af75 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 08 十一月 2023 09:55:40 +0800 Subject: [PATCH] 更改udp --- HDL_ON/DAL/Mqtt/MqttClient.cs | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index 51866d6..9aa07d3 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -133,10 +133,6 @@ new System.Threading.Thread(async () => { while (true) { - if (!UserInfo.Current.IsLogin) - { - return; - } try { System.Threading.Thread.Sleep(2000); @@ -149,6 +145,7 @@ await StartCloudMqtt(); await SubscribeTopics(); + } catch { } } @@ -568,7 +565,7 @@ //SetGatewayOnlineResetCheck(); //var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey); //bus鏁版嵁瑙f瀽 - var packet = new Packet(); + var packet = new Packet(e.ApplicationMessage.Payload.Length); if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey)) { @@ -984,7 +981,7 @@ MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj; - await MQTTConnectAsync(); + //await MQTTConnectAsync(); //1.鍒ゆ柇鏄惁缁戝畾浜嗙綉鍏筹紝鑾峰彇缃戝叧杩滅▼杩炴帴鐨勫姞瀵咾EY //if (DB_ResidenceData.Instance.CheckWhetherGatewayIsBound()) { -- Gitblit v1.8.0