Skip to content

Commit d8d206e

Browse files
Add a comment for posterity
1 parent dbd04c6 commit d8d206e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/ServiceControl.Audit.Persistence.RavenDB/LicenseStatusCheck.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ public static async Task WaitForLicenseOrThrow(DatabaseConfiguration configurati
1616
{
1717
BaseAddress = new Uri(configuration.ServerConfiguration.ConnectionString ?? configuration.ServerConfiguration.ServerUrl)
1818
};
19-
using var cts = new CancellationTokenSource(30_000);
2019

20+
// Not linking to the incoming cancellationToken to ensure no OperationCancelledException prevents the last InvalidOperationException to be thrown
21+
using var cts = new CancellationTokenSource(30_000);
2122
while (!cts.IsCancellationRequested)
2223
{
2324
var httpResponse = await client.GetAsync("license/status", cancellationToken);

src/ServiceControl.Persistence.RavenDB/LicenseStatusCheck.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ public static async Task WaitForLicenseOrThrow(RavenPersisterSettings configurat
1616
{
1717
BaseAddress = new Uri(configuration.ConnectionString ?? configuration.ServerUrl)
1818
};
19-
using var cts = new CancellationTokenSource(30_000);
2019

20+
// Not linking to the incoming cancellationToken to ensure no OperationCancelledException prevents the last InvalidOperationException to be thrown
21+
using var cts = new CancellationTokenSource(30_000);
2122
while (!cts.IsCancellationRequested)
2223
{
2324
var httpResponse = await client.GetAsync("license/status", cancellationToken);

0 commit comments

Comments
 (0)