加大监测本机StarAgent等待时间,以支持低配工控机设备

This commit is contained in:
大石头 2023-08-16 09:10:34 +08:00
parent beb8982b78
commit 4779524184
1 changed files with 2 additions and 2 deletions

View File

@ -83,12 +83,12 @@ public class LocalStarClient
// 某些情况下检查端口占用会抛出异常,原因未知
var gp = IPGlobalProperties.GetIPGlobalProperties();
var eps = gp.GetActiveUdpListeners();
if (!eps.Any(ep => ep.Port == Port)) return null;
if (eps.Length > 0 && !eps.Any(ep => ep.Port == Port)) return null;
}
catch { }
var task = TaskEx.Run(GetInfoAsync);
return task.Wait(500) ? task.Result : null;
return task.Wait(1000) ? task.Result : null;
}
/// <summary>获取信息</summary>