1
0
mirror of https://github.com/bitwarden/server synced 2026-01-04 17:43:53 +00:00

[BRE-1058] fix alpine race condition (#6156)

* alpine race condition during shutdown fix

* change catch to only be for relevant task cancelled, added a debug log

* test commit for build and test

* remove testing comment
This commit is contained in:
aj-bw
2025-08-05 09:20:54 -04:00
committed by GitHub
parent 1c2bccdeff
commit 9081c205b1
3 changed files with 59 additions and 11 deletions

View File

@@ -87,6 +87,11 @@ public class AzureQueueHostedService : IHostedService, IDisposable
await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken);
}
}
catch (TaskCanceledException) when (cancellationToken.IsCancellationRequested)
{
_logger.LogDebug("Task.Delay cancelled during Alpine container shutdown");
break;
}
catch (Exception e)
{
_logger.LogError(e, "Error processing messages.");