mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
Refactor Started Ping
This commit is contained in:
@@ -500,18 +500,17 @@ namespace Netch.Forms
|
||||
{
|
||||
while (State == State.Started)
|
||||
{
|
||||
bool StartedPingEnabled() => Global.Settings.StartedPingInterval >= 0;
|
||||
|
||||
if (StartedPingEnabled())
|
||||
if (Global.Settings.StartedPingInterval >= 0)
|
||||
{
|
||||
server.Test();
|
||||
ServerComboBox.Refresh();
|
||||
}
|
||||
|
||||
if (StartedPingEnabled())
|
||||
Thread.Sleep(Global.Settings.StartedPingInterval * 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
Thread.Sleep(5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user