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