diff --git a/GWMS.UI/GWMS.UI.csproj b/GWMS.UI/GWMS.UI.csproj index a74e8a3..25e85ef 100644 --- a/GWMS.UI/GWMS.UI.csproj +++ b/GWMS.UI/GWMS.UI.csproj @@ -2,7 +2,7 @@ net6.0 - 1.0.2407.2414 + 1.0.2407.2415 95c9f021-52d1-4390-a670-5810b7b777b0 true true diff --git a/GWMS.UI/Health/Checks.cs b/GWMS.UI/Health/Checks.cs index 610eab8..deb3845 100644 --- a/GWMS.UI/Health/Checks.cs +++ b/GWMS.UI/Health/Checks.cs @@ -110,20 +110,27 @@ namespace GWMS.UI.Health public static async Task PingCheck(string hostName) { - using (var thePing = new Ping()) + if (hostName.Contains("::") || hostName.Contains("0.0.0.0")) { - var pingResult = await thePing.SendPingAsync(hostName); - var description = $"Ping to {hostName}"; - var healthCheckData = new Dictionary(); - healthCheckData.Add("RoundTripMS", pingResult.RoundtripTime); - healthCheckData.Add("ActualIPAddress", pingResult.Address.ToString()); - if (pingResult.Status == IPStatus.Success) + return HealthCheckResult.Unhealthy($"Wrong Hostname: {hostName}"); + } + else + { + using (var thePing = new Ping()) { - description += $" - {pingResult.RoundtripTime}ms"; - return HealthCheckResult.Healthy(description, healthCheckData); - } + var pingResult = await thePing.SendPingAsync(hostName); + var description = $"Ping to {hostName}"; + var healthCheckData = new Dictionary(); + healthCheckData.Add("RoundTripMS", pingResult.RoundtripTime); + healthCheckData.Add("ActualIPAddress", pingResult.Address.ToString()); + if (pingResult.Status == IPStatus.Success) + { + description += $" - {pingResult.RoundtripTime}ms"; + return HealthCheckResult.Healthy(description, healthCheckData); + } - return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData); + return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData); + } } } diff --git a/GWMS.UI/Startup.cs b/GWMS.UI/Startup.cs index 81ba2f2..1ddd1ab 100644 --- a/GWMS.UI/Startup.cs +++ b/GWMS.UI/Startup.cs @@ -124,7 +124,7 @@ namespace GWMS.UI // altri parametri per check vari string connStringDB = DbConfig.CONNECTION_STRING; string connStringRedis = Configuration.GetConnectionString("Redis"); - string redisSrvAddr = "localhost"; + string redisSrvAddr = "127.0.0.1"; if (connStringRedis.Contains(":")) { redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":")); diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index ce62fa1..61d59cb 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ GWMS - Gas Warehouse Management System -

Versione: 1.0.2407.2414

+

Versione: 1.0.2407.2415


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index d3de728..5679bfa 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2407.2414 +1.0.2407.2415 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index bebf5bc..0b0ad7a 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2407.2414 + 1.0.2407.2415 http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html false