From e4ab7ba15864d2adb882646d8e09bd00effa4d1b Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 21 八月 2023 17:12:11 +0800 Subject: [PATCH] 2023年08月21日17:12:02 --- HDL_ON/DAL/DriverLayer/Control.cs | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index e60e1ae..0df687c 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -1,6 +1,7 @@ 锘縰sing System; using System.Collections.Generic; using System.Text; +using HDL_ON.DAL.Mqtt; using HDL_ON.DAL.Server; using HDL_ON.Entity; using HDL_ON.UI; @@ -173,7 +174,16 @@ MainPage.Log($"缃戝叧浜戠鍦ㄧ嚎锛屽埛鏂拌澶囩姸鎬�"); new System.Threading.Thread(() => { - System.Threading.Thread.Sleep(1000); + int count = 20; + while (true) + { + System.Threading.Thread.Sleep(500); + if (MqttClient.isSubscribeSuccess || count<1) + { + break; + } + count--; + } FunctionList.List.ReadAllFunctionStatus(); }) { IsBackground = true, Priority = System.Threading.ThreadPriority.AboveNormal }.Start(); -- Gitblit v1.8.0