From e39694f215a14bea3c1b08dcf58c4090286c43e3 Mon Sep 17 00:00:00 2001 From: Stanley Dimant Date: Sat, 15 Mar 2025 13:39:27 +0100 Subject: [PATCH] cancel proper during animation verification --- MareSynchronos/PlayerData/Factories/PlayerDataFactory.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MareSynchronos/PlayerData/Factories/PlayerDataFactory.cs b/MareSynchronos/PlayerData/Factories/PlayerDataFactory.cs index 398ba6e..fa38da0 100644 --- a/MareSynchronos/PlayerData/Factories/PlayerDataFactory.cs +++ b/MareSynchronos/PlayerData/Factories/PlayerDataFactory.cs @@ -239,12 +239,19 @@ public class PlayerDataFactory _logger.LogDebug("Removed {amount} of invalid files", removed); } + ct.ThrowIfCancellationRequested(); + if (objectKind == ObjectKind.Player) { try { await VerifyPlayerAnimationBones(boneIndices, (fragment as CharacterDataFragmentPlayer)!, ct).ConfigureAwait(false); } + catch (OperationCanceledException e) + { + _logger.LogDebug(e, "Cancelled during player animation verification"); + throw; + } catch (Exception e) { _logger.LogWarning(e, "Failed to verify player animations, continuing without further verification");