Fix engine status host not reporting hostname correctly.

The hostname wasn't being cached at server start.
This commit is contained in:
Vera Aguilera Puerto
2021-12-20 17:16:13 +01:00
parent b7b2a0ab5e
commit 0ccee0b496

View File

@@ -98,7 +98,7 @@ namespace Robust.Server.ServerStatus
// Cache this in a field to avoid thread safety shenanigans.
// Writes/reads of references are atomic in C# so no further synchronization necessary.
_configurationManager.OnValueChanged(CVars.GameHostName, n => _serverNameCache = n);
_configurationManager.OnValueChanged(CVars.GameHostName, n => _serverNameCache = n, true);
if (!_configurationManager.GetCVar(CVars.StatusEnabled))
{