From 09bddd9ad46a0f345b8c10212e522b792880cd69 Mon Sep 17 00:00:00 2001 From: Amazing_DM Date: Thu, 19 Mar 2020 23:15:12 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=E5=90=AF=E5=8A=A8=E5=90=8E=E5=B0=86?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BB=A5=201=E7=A7=92/=E6=AC=A1=20=E7=9A=84?= =?UTF-8?q?=E9=80=9F=E5=BA=A6=E6=B5=8B=E8=AF=95=E8=8A=82=E7=82=B9=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=EF=BC=88Tcping=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Netch/Forms/MainForm.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Netch/Forms/MainForm.cs b/Netch/Forms/MainForm.cs index b2beaa7b..4e144327 100644 --- a/Netch/Forms/MainForm.cs +++ b/Netch/Forms/MainForm.cs @@ -875,6 +875,25 @@ namespace Netch.Forms } State = Models.State.Started; + // 自动检测延迟 + Task.Run(() => + { + while (true) + { + if (State == Models.State.Started) + { + server.Test(); + // 重载服务器列表 + InitServer(); + + Thread.Sleep(1000); + } + else + { + break; + } + } + }); } else {