From 6ca1046bf80ac3bc6c6d9964ed97564a6d06b819 Mon Sep 17 00:00:00 2001 From: rootdarkarchon Date: Fri, 10 Feb 2023 12:36:25 +0100 Subject: [PATCH] fixes for disconnect behavior while connecting --- MareSynchronos/WebAPI/ApiController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MareSynchronos/WebAPI/ApiController.cs b/MareSynchronos/WebAPI/ApiController.cs index 5b44822..5a478a0 100644 --- a/MareSynchronos/WebAPI/ApiController.cs +++ b/MareSynchronos/WebAPI/ApiController.cs @@ -124,6 +124,7 @@ public partial class ApiController : MediatorSubscriberBase, IDisposable, IMareH Logger.Info("Not recreating Connection, paused"); _connectionDto = null; await StopConnection(_connectionCancellationTokenSource.Token, ServerState.Disconnected).ConfigureAwait(false); + _connectionCancellationTokenSource.Cancel(); return; } @@ -133,6 +134,7 @@ public partial class ApiController : MediatorSubscriberBase, IDisposable, IMareH Logger.Warn("No secret key set for current character"); _connectionDto = null; await StopConnection(_connectionCancellationTokenSource.Token, ServerState.NoSecretKey).ConfigureAwait(false); + _connectionCancellationTokenSource.Cancel(); return; }