Add in extra check to see if hub server DC'd

This commit is contained in:
2025-09-04 18:41:44 -04:00
parent 3c448f2290
commit 18da07763c

View File

@@ -315,8 +315,8 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
{
await Task.Delay(TimeSpan.FromSeconds(30), ct).ConfigureAwait(false);
var healthy = await CheckClientHealth().ConfigureAwait(false);
Logger.LogDebug("Checking Client Health State returned {0}", healthy);
if (!healthy)
Logger.LogDebug("Checking Client Health State returned {0} and hub connection {1}", healthy, _mareHub.State == HubConnectionState.Connected);
if (!healthy || _mareHub.State != HubConnectionState.Connected)
{
_unhealthy++;
if (_unhealthy > 1)