Skip to content

Commit

Permalink
fix: leader election stop not called (#2059)
Browse files Browse the repository at this point in the history

Signed-off-by: Attila Mészáros <csviri@gmail.com>
  • Loading branch information
csviri authored Sep 19, 2023
1 parent 3e692e3 commit 609a55a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ private void init(LeaderElectionConfiguration config) {
config.getRenewDeadline(),
config.getRetryPeriod(),
leaderCallbacks(),
true,
// this is required to be false to receive stop event in all cases, thus stopLeading
// is called always when leadership is lost/cancelled
false,
config.getLeaseName()))
.build();
}
Expand Down

0 comments on commit 609a55a

Please sign in to comment.