fix ICMPing async warning

This commit is contained in:
ChsBuffer
2021-02-13 12:39:21 +08:00
parent 18f71d3862
commit b26aecf7e8
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ namespace Netch.Models
{
try
{
return Global.Settings.ServerTCPing ? await Utils.Utils.TCPingAsync(destination, Port) : await Utils.Utils.ICMPing(destination, Port);
return Global.Settings.ServerTCPing ? await Utils.Utils.TCPingAsync(destination, Port) : Utils.Utils.ICMPing(destination, Port);
}
catch (Exception)
{

View File

@@ -56,7 +56,7 @@ namespace Netch.Utils
return timeout;
}
public static async Task<int> ICMPing(IPAddress ip, int timeout = 1000)
public static int ICMPing(IPAddress ip, int timeout = 1000)
{
var reply = new Ping().Send(ip, timeout);