adjust some logging, add reregister button to settings ui, change reconnection to server

This commit is contained in:
Stanley Dimant
2022-07-31 16:56:26 +02:00
parent 4e988984d7
commit aaa68bffd6
3 changed files with 26 additions and 7 deletions

View File

@@ -286,9 +286,7 @@ namespace MareSynchronos.WebAPI
Logger.Info("Connection restored");
await Task.Delay(TimeSpan.FromSeconds(new Random().Next(5, 10)));
_connectionDto = await _mareHub.InvokeAsync<ConnectionDto>(Api.InvokeHeartbeat, _dalamudUtil.PlayerNameHashed, _connectionCancellationTokenSource.Token);
await InitializeData(_connectionCancellationTokenSource.Token);
_ = Task.Run(CreateConnections);
}
private Task MareHubOnReconnecting(Exception? arg)
@@ -305,9 +303,9 @@ namespace MareSynchronos.WebAPI
private async Task StopConnection(CancellationToken token)
{
Logger.Info("Stopping all connections");
if (_mareHub is not null)
{
Logger.Info("Stopping all connections");
await _mareHub.StopAsync(token);
_mareHub.Closed -= MareHubOnClosed;
_mareHub.Reconnected -= MareHubOnReconnected;