Add in extra check to see if hub server DC'd
This commit is contained in:
@@ -315,8 +315,8 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
|
|||||||
{
|
{
|
||||||
await Task.Delay(TimeSpan.FromSeconds(30), ct).ConfigureAwait(false);
|
await Task.Delay(TimeSpan.FromSeconds(30), ct).ConfigureAwait(false);
|
||||||
var healthy = await CheckClientHealth().ConfigureAwait(false);
|
var healthy = await CheckClientHealth().ConfigureAwait(false);
|
||||||
Logger.LogDebug("Checking Client Health State returned {0}", healthy);
|
Logger.LogDebug("Checking Client Health State returned {0} and hub connection {1}", healthy, _mareHub.State == HubConnectionState.Connected);
|
||||||
if (!healthy)
|
if (!healthy || _mareHub.State != HubConnectionState.Connected)
|
||||||
{
|
{
|
||||||
_unhealthy++;
|
_unhealthy++;
|
||||||
if (_unhealthy > 1)
|
if (_unhealthy > 1)
|
||||||
|
Reference in New Issue
Block a user