Log when a swarm server broadcast is skipped

This commit is contained in:
Dominion
2023-04-28 12:37:01 -04:00
parent 4883d880c0
commit 0d009a8496
@@ -1117,7 +1117,13 @@ namespace Tgstation.Server.Host.Swarm
currentSwarmServers = swarmServers.ToList();
}
logger.LogDebug("Sending updated server list to all {nodeCount} nodes...", currentSwarmServers.Count);
if (currentSwarmServers.Count == 1)
{
logger.LogTrace("Skipping server list broadcast as no nodes are connected!");
return;
}
logger.LogDebug("Sending updated server list to all {nodeCount} nodes...", currentSwarmServers.Count - 1);
using var httpClient = httpClientFactory.CreateClient();
async Task UpdateRequestForServer(SwarmServerResponse swarmServer)