We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2899a13 commit 20d0a81Copy full SHA for 20d0a81
src/KubernetesClient/LeaderElection/LeaderElector.cs
@@ -211,8 +211,11 @@ private async Task AcquireAsync(CancellationToken cancellationToken)
211
// wait RetryPeriod since acq return immediately
212
await Task.Delay(delay, cancellationToken).ConfigureAwait(false);
213
}
214
-
215
- // else timeout
+ else
+ {
216
+ // else timeout
217
+ _ = acq.ContinueWith(t => _ = t.Exception /* prevent UnobservedTaskException */, TaskContinuationOptions.OnlyOnFaulted);
218
+ }
219
220
finally
221
{
0 commit comments