From 0abf5e2190c1a2a31c60c76cebeab7d470c32cee Mon Sep 17 00:00:00 2001 From: Rutherther Date: Fri, 30 Dec 2022 19:53:23 +0100 Subject: [PATCH] fix(combat): cancel combat when cancellation token is cancelled --- Extensions/NosSmooth.Extensions.Combat/CombatManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/NosSmooth.Extensions.Combat/CombatManager.cs b/Extensions/NosSmooth.Extensions.Combat/CombatManager.cs index a9078e8..1a64fe1 100644 --- a/Extensions/NosSmooth.Extensions.Combat/CombatManager.cs +++ b/Extensions/NosSmooth.Extensions.Combat/CombatManager.cs @@ -50,7 +50,7 @@ public class CombatManager : IStatefulEntity long? currentTarget = null; long? previousTarget = null; - while (!combatState.ShouldQuit) + while (!combatState.ShouldQuit && !ct.IsCancellationRequested) { var commandResult = await _client.SendCommandAsync ( -- 2.48.1