mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
fix ICMPing async warning
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user