diff --git a/src/Squidex.Infrastructure/Log/LockingLogStore.cs b/src/Squidex.Infrastructure/Log/LockingLogStore.cs index bafce0bd2..83829d129 100644 --- a/src/Squidex.Infrastructure/Log/LockingLogStore.cs +++ b/src/Squidex.Infrastructure/Log/LockingLogStore.cs @@ -52,10 +52,17 @@ namespace Squidex.Infrastructure.Log break; } - await Task.Delay(2000, cts.Token); + try + { + await Task.Delay(2000, cts.Token); + } + catch (TaskCanceledException) + { + break; + } } - if (!cts.IsCancellationRequested) + if (releaseToken != null) { try {