Skip to content

Commit

Permalink
Leader Election doesn't properly report OnError
Browse files Browse the repository at this point in the history
Fixes #1593
  • Loading branch information
tg123 committed Nov 6, 2024
1 parent c3b3a08 commit f817962
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/KubernetesClient/LeaderElection/LeaderElector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ private async Task<bool> TryAcquireOrRenew(CancellationToken cancellationToken)
{
if (e.Response.StatusCode != HttpStatusCode.NotFound)
{
OnError?.Invoke(e);
return false;
}

OnError?.Invoke(e);
}

if (oldLeaderElectionRecord?.AcquireTime == null ||
Expand Down

0 comments on commit f817962

Please sign in to comment.