From f69332a116b08987800f6d4b7041342e3081305e Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 24 十二月 2020 16:55:42 +0800
Subject: [PATCH] 一端口远程控制场景改成由云端控制

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

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index eb7a731..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>

--
Gitblit v1.8.0