diff --git a/src/ARKServerManager/App.config b/src/ARKServerManager/App.config
index 72e98e97..53c0f76e 100644
--- a/src/ARKServerManager/App.config
+++ b/src/ARKServerManager/App.config
@@ -333,7 +333,7 @@
5000
- 120000
+ 60000
Engine.ini
diff --git a/src/ARKServerManager/Config.Designer.cs b/src/ARKServerManager/Config.Designer.cs
index 14ad23b3..45ae9010 100644
--- a/src/ARKServerManager/Config.Designer.cs
+++ b/src/ARKServerManager/Config.Designer.cs
@@ -2404,7 +2404,7 @@ namespace ServerManagerTool {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("120000")]
+ [global::System.Configuration.DefaultSettingValueAttribute("60000")]
public int ServerStatusWatcher_RemoteStatusQueryDelay {
get {
return ((int)(this["ServerStatusWatcher_RemoteStatusQueryDelay"]));
diff --git a/src/ARKServerManager/Config.settings b/src/ARKServerManager/Config.settings
index 9d75724e..c5f1fe1b 100644
--- a/src/ARKServerManager/Config.settings
+++ b/src/ARKServerManager/Config.settings
@@ -672,7 +672,7 @@
5000
- 120000
+ 60000
False
diff --git a/src/ARKServerManager/Lib/ServerRuntime.cs b/src/ARKServerManager/Lib/ServerRuntime.cs
index 12f2f517..00a6f3d6 100644
--- a/src/ARKServerManager/Lib/ServerRuntime.cs
+++ b/src/ARKServerManager/Lib/ServerRuntime.cs
@@ -252,84 +252,162 @@ namespace ServerManagerTool.Lib
{
case WatcherServerStatus.Unknown:
if (oldStatus != ServerStatus.Updating)
- UpdateServerStatus(ServerStatus.Unknown, AvailabilityStatus.Unknown, false);
+ {
+ UpdateServerStatus(
+ ServerStatus.Unknown,
+ AvailabilityStatus.Unknown,
+ false);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
case WatcherServerStatus.NotInstalled:
if (oldStatus != ServerStatus.Updating)
- UpdateServerStatus(ServerStatus.Uninstalled, AvailabilityStatus.Unavailable, false);
+ {
+ UpdateServerStatus(
+ ServerStatus.Uninstalled,
+ AvailabilityStatus.Unavailable,
+ false);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
case WatcherServerStatus.Stopped:
if (oldStatus != ServerStatus.Updating)
- UpdateServerStatus(ServerStatus.Stopped, AvailabilityStatus.Unavailable, oldStatus == ServerStatus.Initializing || oldStatus == ServerStatus.Running || oldStatus == ServerStatus.Stopping);
+ {
+ UpdateServerStatus(
+ ServerStatus.Stopped,
+ AvailabilityStatus.Unavailable,
+ oldStatus == ServerStatus.Initializing || oldStatus == ServerStatus.Running || oldStatus == ServerStatus.Stopping);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
case WatcherServerStatus.Initializing:
if (oldStatus != ServerStatus.Stopping)
- UpdateServerStatus(ServerStatus.Initializing, AvailabilityStatus.Unavailable, oldStatus != ServerStatus.Initializing && oldStatus != ServerStatus.Unknown);
+ {
+ UpdateServerStatus(
+ ServerStatus.Initializing,
+ AvailabilityStatus.Unavailable,
+ oldStatus != ServerStatus.Initializing && oldStatus != ServerStatus.Unknown);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
- case WatcherServerStatus.RunningLocalCheck:
+ case WatcherServerStatus.LocalSuccess:
if (oldStatus != ServerStatus.Stopping)
{
- UpdateServerStatus(ServerStatus.Running, oldAvailability != AvailabilityStatus.Available ? AvailabilityStatus.LocalOnly : AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+ UpdateServerStatus(
+ ServerStatus.Running,
+ AvailabilityStatus.LocalOnly,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
- if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Start();
+ }
}
else
{
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
}
break;
- case WatcherServerStatus.RunningExternalCheck:
+ case WatcherServerStatus.ExternalSkipped:
if (oldStatus != ServerStatus.Stopping)
{
- UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.PublicOnly, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+ UpdateServerStatus(
+ ServerStatus.Running,
+ oldAvailability >= AvailabilityStatus.PublicOnly ? AvailabilityStatus.PublicOnly : AvailabilityStatus.LocalOnly,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
- if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Start();
+ }
}
else
{
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+ }
+ break;
+
+ case WatcherServerStatus.ExternalSuccess:
+ if (oldStatus != ServerStatus.Stopping)
+ {
+ UpdateServerStatus(
+ ServerStatus.Running,
+ AvailabilityStatus.PublicOnly,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
+ this.motdIntervalTimer.Start();
+ }
+ }
+ else
+ {
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
+ this.motdIntervalTimer.Stop();
+ }
}
break;
case WatcherServerStatus.Published:
if (oldStatus != ServerStatus.Stopping)
{
- UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+ UpdateServerStatus(
+ ServerStatus.Running,
+ AvailabilityStatus.Available,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
- if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Start();
+ }
}
else
{
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
}
break;
default:
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
}
diff --git a/src/ARKServerManager/Lib/ServerStatusWatcher.cs b/src/ARKServerManager/Lib/ServerStatusWatcher.cs
index 64de877f..10990a09 100644
--- a/src/ARKServerManager/Lib/ServerStatusWatcher.cs
+++ b/src/ARKServerManager/Lib/ServerStatusWatcher.cs
@@ -150,52 +150,52 @@ namespace ServerManagerTool.Lib
var currentStatus = WatcherServerStatus.Initializing;
- //
- // If the process was running do we then perform network checks.
- //
- Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server local network status at {registration.LocalEndpoint}");
+ Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server local (directly) status at {registration.LocalEndpoint}");
- // get the server information direct from the server using local connection.
+ // get the server information direct from the server using local endpoint.
var serverStatus = GetLocalNetworkStatus(registration.LocalEndpoint, out ServerInfo localInfo, out int onlinePlayerCount);
if (serverStatus)
{
- currentStatus = WatcherServerStatus.RunningLocalCheck;
+ currentStatus = WatcherServerStatus.LocalSuccess;
- //
- // Now that it's running, we can check the publication status.
- //
Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server public (directly) status at {registration.PublicEndpoint}");
- // get the server information direct from the server using public connection.
+ // get the server information direct from the server using public endpoint.
serverStatus = GetPublicNetworkStatusDirectly(registration.PublicEndpoint);
- // check if the server returned the information.
- if (!serverStatus)
+ if (serverStatus)
+ {
+ _nextExternalStatusQuery[registrationKey] = DateTime.MinValue;
+
+ currentStatus = WatcherServerStatus.Published;
+ }
+ else if (!string.IsNullOrWhiteSpace(Config.Default.ServerStatusUrlFormat))
{
- // server did not return any information
var nextExternalStatusQuery = _nextExternalStatusQuery.ContainsKey(registrationKey) ? _nextExternalStatusQuery[registrationKey] : DateTime.MinValue;
if (DateTime.Now >= nextExternalStatusQuery)
{
- currentStatus = WatcherServerStatus.RunningExternalCheck;
+ Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server public (externally) status at {registration.PublicEndpoint}");
- if (!string.IsNullOrWhiteSpace(Config.Default.ServerStatusUrlFormat))
+ // get the server information direct from the server using external endpoint.
+ var url = string.Format(Config.Default.ServerStatusUrlFormat, Config.Default.ServerManagerCode, App.Instance.Version, registration.PublicEndpoint.Address, registration.PublicEndpoint.Port);
+ var uri = new Uri(url);
+ serverStatus = await GetPublicNetworkStatusViaAPIAsync(uri, registration.PublicEndpoint);
+
+ var remoteStatusQueryDelay = serverStatus
+ ? Config.Default.ServerStatusWatcher_RemoteStatusQueryDelay
+ : 15000;
+ _nextExternalStatusQuery[registrationKey] = DateTime.Now.AddMilliseconds(remoteStatusQueryDelay);
+
+ if (serverStatus)
{
- Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server public (via api) status at {registration.PublicEndpoint}");
-
- // get the server information direct from the server using external connection.
- var uri = new Uri(string.Format(Config.Default.ServerStatusUrlFormat, Config.Default.ServerManagerCode, App.Instance.Version, registration.PublicEndpoint.Address, registration.PublicEndpoint.Port));
- serverStatus = await GetPublicNetworkStatusViaAPIAsync(uri, registration.PublicEndpoint);
+ currentStatus = WatcherServerStatus.ExternalSuccess;
}
-
- _nextExternalStatusQuery[registrationKey] = DateTime.Now.AddMilliseconds(Config.Default.ServerStatusWatcher_RemoteStatusQueryDelay);
}
- }
-
- // check if the server returned the information.
- if (serverStatus)
- {
- currentStatus = WatcherServerStatus.Published;
+ else
+ {
+ currentStatus = WatcherServerStatus.ExternalSkipped;
+ }
}
}
diff --git a/src/ARKServerManager/VersionFeed.xml b/src/ARKServerManager/VersionFeed.xml
index d1ecbfc2..083ba99d 100644
--- a/src/ARKServerManager/VersionFeed.xml
+++ b/src/ARKServerManager/VersionFeed.xml
@@ -5,7 +5,30 @@
Ark Server Manager Version Feed
This is the Ark Server Manager release version feed.
- 2022-07-11T00:00:00Z
+ 2022-07-15T00:00:00Z
+
+
+ urn:uuid:8CDA70CF-E8B8-4B9B-AD50-AD9A8B528E5B
+ 1.1.436 (1.1.436.1)
+ 1.1.436.1
+
+ 2022-07-15T00:00:00Z
+
+
+
+ BUGFIX
+
+
+ Server Status - changed the server status code to stop the status cycling and to be more accurate.
+
+
+
+
+
+ bletch
+ bletch1971@hotmail.com
+
+
urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877
diff --git a/src/ARKServerManager/VersionFeedBeta.xml b/src/ARKServerManager/VersionFeedBeta.xml
index aea4c375..750127f9 100644
--- a/src/ARKServerManager/VersionFeedBeta.xml
+++ b/src/ARKServerManager/VersionFeedBeta.xml
@@ -5,120 +5,21 @@
Ark Server Manager Version Feed
This is the Ark Server Manager beta version feed.
- 2022-07-12T00:00:00Z
+ 2022-07-15T00:00:00Z
- urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877
- 1.1.435 (1.1.435.5)
- 1.1.435.4
+ urn:uuid:8CDA70CF-E8B8-4B9B-AD50-AD9A8B528E5B
+ 1.1.436 (1.1.436.1)
+ 1.1.436.1
- 2022-07-12T00:00:00Z
-
-
-
- CHANGE
-
-
- Updated all URL links to use https.
-
-
-
-
-
- bletch
- bletch1971@hotmail.com
-
-
-
-
- urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877
- 1.1.435 (1.1.435.4)
- 1.1.435.4
-
- 2022-07-11T00:00:00Z
+ 2022-07-15T00:00:00Z
BUGFIX
- RCON - changed the way the online players are handled when they contain a '.' character.
-
-
NEW
-
-
- tr-TR Translation file added.
-
-
-
-
-
- bletch
- bletch1971@hotmail.com
-
-
-
-
- urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877
- 1.1.435 (1.1.435.3)
- 1.1.435.3
-
- 2022-07-08T00:00:00Z
-
-
-
- BUGFIX
-
-
- Server Settings - Rules Section - Enable Tribe Alliance - fixed the checkbox, so that it enables/disables per profile.
- Server Settings - Environment Section - Custom Harvest Amount Multiplier - fixed the checkbox, so that it enables/disables when there are changes or unknown resources.
-
-
-
-
-
- bletch
- bletch1971@hotmail.com
-
-
-
-
- urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877
- 1.1.435 (1.1.435.2)
- 1.1.435.2
-
- 2022-07-08T00:00:00Z
-
-
-
- CHANGE
-
-
- Added config settings to allow multiple CPUs to be read when setting the CPU Affinity.
- fr-FR Translation file updated.
-
-
-
-
-
- bletch
- bletch1971@hotmail.com
-
-
-
-
- urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877
- 1.1.435 (1.1.435.1)
- 1.1.435.1
-
- 2022-07-01T00:00:00Z
-
-
-
- CHANGE
-
-
- zh-CN Translation file updated.
+ Server Status - changed the server status code to stop the status cycling and to be more accurate.
diff --git a/src/ConanServerManager/App.config b/src/ConanServerManager/App.config
index 2b762ccb..866b2103 100644
--- a/src/ConanServerManager/App.config
+++ b/src/ConanServerManager/App.config
@@ -258,7 +258,7 @@
5000
- 120000
+ 60000
csmdata
diff --git a/src/ConanServerManager/Config.Designer.cs b/src/ConanServerManager/Config.Designer.cs
index 05602b89..727e3171 100644
--- a/src/ConanServerManager/Config.Designer.cs
+++ b/src/ConanServerManager/Config.Designer.cs
@@ -1842,7 +1842,7 @@ namespace ServerManagerTool {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("120000")]
+ [global::System.Configuration.DefaultSettingValueAttribute("60000")]
public int ServerStatusWatcher_RemoteStatusQueryDelay {
get {
return ((int)(this["ServerStatusWatcher_RemoteStatusQueryDelay"]));
diff --git a/src/ConanServerManager/Config.settings b/src/ConanServerManager/Config.settings
index cfdad492..18907b1c 100644
--- a/src/ConanServerManager/Config.settings
+++ b/src/ConanServerManager/Config.settings
@@ -513,7 +513,7 @@
5000
- 120000
+ 60000
False
diff --git a/src/ConanServerManager/Lib/ServerRuntime.cs b/src/ConanServerManager/Lib/ServerRuntime.cs
index 69e8acdd..3ae37ad7 100644
--- a/src/ConanServerManager/Lib/ServerRuntime.cs
+++ b/src/ConanServerManager/Lib/ServerRuntime.cs
@@ -251,84 +251,162 @@ namespace ServerManagerTool.Lib
{
case WatcherServerStatus.Unknown:
if (oldStatus != ServerStatus.Updating)
- UpdateServerStatus(ServerStatus.Unknown, AvailabilityStatus.Unknown, false);
+ {
+ UpdateServerStatus(
+ ServerStatus.Unknown,
+ AvailabilityStatus.Unknown,
+ false);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
case WatcherServerStatus.NotInstalled:
if (oldStatus != ServerStatus.Updating)
- UpdateServerStatus(ServerStatus.Uninstalled, AvailabilityStatus.Unavailable, false);
+ {
+ UpdateServerStatus(
+ ServerStatus.Uninstalled,
+ AvailabilityStatus.Unavailable,
+ false);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
case WatcherServerStatus.Stopped:
if (oldStatus != ServerStatus.Updating)
- UpdateServerStatus(ServerStatus.Stopped, AvailabilityStatus.Unavailable, oldStatus == ServerStatus.Initializing || oldStatus == ServerStatus.Running || oldStatus == ServerStatus.Stopping);
+ {
+ UpdateServerStatus(
+ ServerStatus.Stopped,
+ AvailabilityStatus.Unavailable,
+ oldStatus == ServerStatus.Initializing || oldStatus == ServerStatus.Running || oldStatus == ServerStatus.Stopping);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
case WatcherServerStatus.Initializing:
if (oldStatus != ServerStatus.Stopping)
- UpdateServerStatus(ServerStatus.Initializing, AvailabilityStatus.Unavailable, oldStatus != ServerStatus.Initializing && oldStatus != ServerStatus.Unknown);
+ {
+ UpdateServerStatus(
+ ServerStatus.Initializing,
+ AvailabilityStatus.Unavailable,
+ oldStatus != ServerStatus.Initializing && oldStatus != ServerStatus.Unknown);
+ }
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
- case WatcherServerStatus.RunningLocalCheck:
+ case WatcherServerStatus.LocalSuccess:
if (oldStatus != ServerStatus.Stopping)
{
- UpdateServerStatus(ServerStatus.Running, oldAvailability != AvailabilityStatus.Available ? AvailabilityStatus.LocalOnly : AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+ UpdateServerStatus(
+ ServerStatus.Running,
+ AvailabilityStatus.LocalOnly,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
- if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Start();
+ }
}
else
{
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
}
break;
- case WatcherServerStatus.RunningExternalCheck:
+ case WatcherServerStatus.ExternalSkipped:
if (oldStatus != ServerStatus.Stopping)
{
- UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.PublicOnly, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+ UpdateServerStatus(
+ ServerStatus.Running,
+ oldAvailability >= AvailabilityStatus.PublicOnly ? AvailabilityStatus.PublicOnly : AvailabilityStatus.LocalOnly,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
- if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Start();
+ }
}
else
{
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+ }
+ break;
+
+ case WatcherServerStatus.ExternalSuccess:
+ if (oldStatus != ServerStatus.Stopping)
+ {
+ UpdateServerStatus(
+ ServerStatus.Running,
+ AvailabilityStatus.PublicOnly,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
+ this.motdIntervalTimer.Start();
+ }
+ }
+ else
+ {
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
+ this.motdIntervalTimer.Stop();
+ }
}
break;
case WatcherServerStatus.Published:
if (oldStatus != ServerStatus.Stopping)
{
- UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
+ UpdateServerStatus(
+ ServerStatus.Running,
+ AvailabilityStatus.Available,
+ oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
- if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Start();
+ }
}
else
{
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
}
break;
default:
- if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled)
+ {
this.motdIntervalTimer.Stop();
+ }
+
break;
}
diff --git a/src/ConanServerManager/Lib/ServerStatusWatcher.cs b/src/ConanServerManager/Lib/ServerStatusWatcher.cs
index 20d3ba91..878b7d46 100644
--- a/src/ConanServerManager/Lib/ServerStatusWatcher.cs
+++ b/src/ConanServerManager/Lib/ServerStatusWatcher.cs
@@ -150,52 +150,52 @@ namespace ServerManagerTool.Lib
var currentStatus = WatcherServerStatus.Initializing;
- //
- // If the process was running do we then perform network checks.
- //
- Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server local network status at {registration.LocalEndpoint}");
+ Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server local (directly) status at {registration.LocalEndpoint}");
- // get the server information direct from the server using local connection.
+ // get the server information direct from the server using local endpoint.
var serverStatus = GetLocalNetworkStatus(registration.LocalEndpoint, out ServerInfo localInfo, out int onlinePlayerCount);
if (serverStatus)
{
- currentStatus = WatcherServerStatus.RunningLocalCheck;
+ currentStatus = WatcherServerStatus.LocalSuccess;
- //
- // Now that it's running, we can check the publication status.
- //
Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server public (directly) status at {registration.PublicEndpoint}");
- // get the server information direct from the server using public connection.
+ // get the server information direct from the server using public endpoint.
serverStatus = GetPublicNetworkStatusDirectly(registration.PublicEndpoint);
- // check if the server returned the information.
- if (!serverStatus)
+ if (serverStatus)
+ {
+ _nextExternalStatusQuery[registrationKey] = DateTime.MinValue;
+
+ currentStatus = WatcherServerStatus.Published;
+ }
+ else if (!string.IsNullOrWhiteSpace(Config.Default.ServerStatusUrlFormat))
{
- // server did not return any information
var nextExternalStatusQuery = _nextExternalStatusQuery.ContainsKey(registrationKey) ? _nextExternalStatusQuery[registrationKey] : DateTime.MinValue;
if (DateTime.Now >= nextExternalStatusQuery)
{
- currentStatus = WatcherServerStatus.RunningExternalCheck;
+ Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server public (externally) status at {registration.PublicEndpoint}");
- if (!string.IsNullOrWhiteSpace(Config.Default.ServerStatusUrlFormat))
+ // get the server information direct from the server using external endpoint.
+ var url = string.Format(Config.Default.ServerStatusUrlFormat, Config.Default.ServerManagerCode, App.Instance.Version, registration.PublicEndpoint.Address, registration.PublicEndpoint.Port);
+ var uri = new Uri(url);
+ serverStatus = await GetPublicNetworkStatusViaAPIAsync(uri, registration.PublicEndpoint);
+
+ var remoteStatusQueryDelay = serverStatus
+ ? Config.Default.ServerStatusWatcher_RemoteStatusQueryDelay
+ : 15000;
+ _nextExternalStatusQuery[registrationKey] = DateTime.Now.AddMilliseconds(remoteStatusQueryDelay);
+
+ if (serverStatus)
{
- Logger.Info($"{nameof(DoServerStatusUpdateAsync)} Checking server public (via api) status at {registration.PublicEndpoint}");
-
- // get the server information direct from the server using external connection.
- var uri = new Uri(string.Format(Config.Default.ServerStatusUrlFormat, Config.Default.ServerManagerCode, App.Instance.Version, registration.PublicEndpoint.Address, registration.PublicEndpoint.Port));
- serverStatus = await GetPublicNetworkStatusViaAPIAsync(uri, registration.PublicEndpoint);
+ currentStatus = WatcherServerStatus.ExternalSuccess;
}
-
- _nextExternalStatusQuery[registrationKey] = DateTime.Now.AddMilliseconds(Config.Default.ServerStatusWatcher_RemoteStatusQueryDelay);
}
- }
-
- // check if the server returned the information.
- if (serverStatus)
- {
- currentStatus = WatcherServerStatus.Published;
+ else
+ {
+ currentStatus = WatcherServerStatus.ExternalSkipped;
+ }
}
}
diff --git a/src/ConanServerManager/VersionFeed.xml b/src/ConanServerManager/VersionFeed.xml
index 7d989c86..baa6a4fe 100644
--- a/src/ConanServerManager/VersionFeed.xml
+++ b/src/ConanServerManager/VersionFeed.xml
@@ -5,7 +5,30 @@
Conan Server Manager Version Feed
This is the Conan Server Manager release version feed.
- 2022-07-08T00:00:00Z
+ 2022-07-15T00:00:00Z
+
+
+ urn:uuid:8CDA70CF-E8B8-4B9B-AD50-AD9A8B528E5B
+ 1.1.79 (1.1.79.1)
+ 1.1.79.1
+
+ 2022-07-15T00:00:00Z
+
+
+
+ BUGFIX
+
+
+ Server Status - changed the server status code to stop the status cycling and to be more accurate.
+
+
+
+
+
+ bletch
+ bletch1971@hotmail.com
+
+
urn:uuid:CDD1853D-66EA-4649-AD24-E491D64C853E
diff --git a/src/ConanServerManager/VersionFeedBeta.xml b/src/ConanServerManager/VersionFeedBeta.xml
index 8ed55e6d..20843139 100644
--- a/src/ConanServerManager/VersionFeedBeta.xml
+++ b/src/ConanServerManager/VersionFeedBeta.xml
@@ -5,44 +5,21 @@
Conan Server Manager Version Feed
This is the Conan Server Manager beta version feed.
- 2022-07-12T00:00:00Z
+ 2022-07-15T00:00:00Z
- urn:uuid:CDD1853D-66EA-4649-AD24-E491D64C853E
- 1.1.78 (1.1.78.2)
- 1.1.78.1
+ urn:uuid:8CDA70CF-E8B8-4B9B-AD50-AD9A8B528E5B
+ 1.1.79 (1.1.79.1)
+ 1.1.79.1
- 2022-07-12T00:00:00Z
+ 2022-07-15T00:00:00Z
- CHANGE
+ BUGFIX
- Updated all URL links to use https.
-
-
-
-
-
- bletch
- bletch1971@hotmail.com
-
-
-
-
- urn:uuid:CDD1853D-66EA-4649-AD24-E491D64C853E
- 1.1.78 (1.1.78.1)
- 1.1.78.1
-
- 2022-07-08T00:00:00Z
-
-
-
- CHANGE
-
-
- Added config settings to allow multiple CPUs to be read when setting the CPU Affinity.
+ Server Status - changed the server status code to stop the status cycling and to be more accurate.
diff --git a/src/ServerManager.Common/Enums/WatcherServerStatus.cs b/src/ServerManager.Common/Enums/WatcherServerStatus.cs
index a537c523..86339240 100644
--- a/src/ServerManager.Common/Enums/WatcherServerStatus.cs
+++ b/src/ServerManager.Common/Enums/WatcherServerStatus.cs
@@ -25,15 +25,20 @@
///
/// The server is responding locally on its port, a local check was made
///
- RunningLocalCheck,
+ LocalSuccess,
+
+ ///
+ /// The server is responding locally on its port, a public check was skipped
+ ///
+ ExternalSkipped,
///
/// The server is responding locally on its port, a public check was made
///
- RunningExternalCheck,
+ ExternalSuccess,
///
- /// The server is responding externally on its port
+ /// The server is responding publicly on its port
///
Published,
}