Skip to content

Commit a139dd5

Browse files
authored
Leader Election doesn't properly report OnError (#1594)
Fixes #1593
1 parent c3b3a08 commit a139dd5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/KubernetesClient/LeaderElection/LeaderElector.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,9 @@ private async Task<bool> TryAcquireOrRenew(CancellationToken cancellationToken)
163163
{
164164
if (e.Response.StatusCode != HttpStatusCode.NotFound)
165165
{
166+
OnError?.Invoke(e);
166167
return false;
167168
}
168-
169-
OnError?.Invoke(e);
170169
}
171170

172171
if (oldLeaderElectionRecord?.AcquireTime == null ||

0 commit comments

Comments
 (0)