Skip to content

Commit f817962

Browse files
committed
Leader Election doesn't properly report OnError
Fixes kubernetes-client#1593
1 parent c3b3a08 commit f817962

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)