potential fix for automatic reconnects

This commit is contained in:
Stanley Dimant
2022-11-03 10:26:22 +01:00
parent 5694eb7d08
commit 153fd9b1c8

View File

@@ -267,6 +267,7 @@ public partial class ApiController : IDisposable, IMareHubClient
Logger.Debug("Checked Client Health State, healthy: " + !needsRestart);
if (needsRestart)
{
ServerState = ServerState.Offline;
_ = CreateConnections();
}
}
@@ -380,7 +381,6 @@ public partial class ApiController : IDisposable, IMareHubClient
await _mareHub.DisposeAsync().ConfigureAwait(false);
CurrentUploads.Clear();
CurrentDownloads.Clear();
_uploadCancellationTokenSource?.Cancel();
Disconnected?.Invoke();
_mareHub = null;
}