mirror of
https://github.com/netchx/netch.git
synced 2026-04-01 19:15:09 +08:00
:sparkles:启动后将自动以 1秒/次 的速度测试节点延迟(Tcping)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user