From e12563d20ff756de7bf5fecde6a10d89e0c19de0 Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Thu, 22 Feb 2024 18:31:04 +0900 Subject: [PATCH] Suppress cancelled task exception from bubbling --- .../Interface/Internal/SharableTextures/TextureLoadThrottler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dalamud/Interface/Internal/SharableTextures/TextureLoadThrottler.cs b/Dalamud/Interface/Internal/SharableTextures/TextureLoadThrottler.cs index f540ebe87..47e3ab90f 100644 --- a/Dalamud/Interface/Internal/SharableTextures/TextureLoadThrottler.cs +++ b/Dalamud/Interface/Internal/SharableTextures/TextureLoadThrottler.cs @@ -90,6 +90,7 @@ internal class TextureLoadThrottler : IServiceType if (work.CancellationToken.IsCancellationRequested) { work.TaskCompletionSource.SetCanceled(work.CancellationToken); + _ = work.TaskCompletionSource.Task.Exception; this.RelocatePendingWorkItemToEndAndEraseUnsafe(i--); continue; } @@ -117,6 +118,7 @@ internal class TextureLoadThrottler : IServiceType catch (Exception e) { minWork.TaskCompletionSource.SetException(e); + _ = minWork.TaskCompletionSource.Task.Exception; } lock (this.workListLock)