diff --git a/Netch/Models/Server.cs b/Netch/Models/Server.cs index cac7051b..647c2b74 100644 --- a/Netch/Models/Server.cs +++ b/Netch/Models/Server.cs @@ -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) { diff --git a/Netch/Utils/Utils.cs b/Netch/Utils/Utils.cs index dd34569a..2ac925e5 100644 --- a/Netch/Utils/Utils.cs +++ b/Netch/Utils/Utils.cs @@ -56,7 +56,7 @@ namespace Netch.Utils return timeout; } - public static async Task ICMPing(IPAddress ip, int timeout = 1000) + public static int ICMPing(IPAddress ip, int timeout = 1000) { var reply = new Ping().Send(ip, timeout);