生效定时检查逻辑

This commit is contained in:
Administrator committed 2026-08-05 10:17:39 +08:00
commit bbdf6cf75f
1 file changed
+6 -2
+6 -2
View File
@@ -24,7 +24,10 @@ namespace ForwardingServerUI.Class
public required string SERRVERPASWORD { get; set; }
public required string MachineVer { get; set; }
}
private static Timer? _timer;
public static TcpService service = new TcpService();
public static async Task TcpMain()
{
//TcpService service = new TcpService();
@@ -157,9 +160,10 @@ namespace ForwardingServerUI.Class
Console.WriteLine("TcpServer:Run");
Timer timer = new Timer(TimerCallback, null, TimeSpan.FromSeconds(90), TimeSpan.FromSeconds(30));
//启动检查循环定时器
_timer = new Timer(TimerCallback, null, TimeSpan.FromSeconds(90), TimeSpan.FromSeconds(30));
}
private static async void TimerCallback(object? state)
{
try