From 24a2c4998ee6d6a2b584d89804ebf99afc5f3629 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 24 十二月 2020 18:44:36 +0800
Subject: [PATCH] 20201224-6

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

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index fb5d3b5..ec55e61 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -32,18 +32,18 @@
         /// </summary>
         static string RandomKey = "";
 
+        /// <summary>
+        /// 闅忔満鐢熸垚瀛楃
+        /// </summary>
+        /// <returns></returns>
         static string GetRandomKey()
         {
             if (string.IsNullOrEmpty(RandomKey))
             {
                 //闅忔満2浣嶅瓧绗︿覆
-                Random random = new Random(Guid.NewGuid().GetHashCode());
-                int num = random.Next(65, 91);
-                RandomKey = Convert.ToChar(num).ToString();
+                RandomKey = Utlis.CreateRandomString(2);
             }
-
             return RandomKey;
-
         }
 
         /// <summary>
@@ -291,12 +291,12 @@
                                             packet.Bytes = e.ApplicationMessage.Payload;
                                         }
 #if DEBUG
-                                        string ddd = "";
-                                        foreach (var bb in packet.Bytes)
-                                        {
-                                            ddd += bb + ",";
-                                        }
-                                        MainPage.Log($"mqtt bus data:{ddd}");
+                                        //string ddd = "";
+                                        //foreach (var bb in packet.Bytes)
+                                        //{
+                                        //    ddd += bb + ",";
+                                        //}
+                                        //MainPage.Log($"mqtt bus data:{ddd}");
 #endif
                                         packet.Manager();
                                     }

--
Gitblit v1.8.0