Skip to content

Commit

Permalink
#175 - Don't try to register as leader after close.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrmiller committed Jul 15, 2020
1 parent ee096f0 commit c6cb6ab
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ void runLeaderProcess(ElectionContext context, boolean weAreReplacement, int pau
String parent = Paths.get(leaderPath).getParent().toString();
List<String> errors = new ArrayList<>();
try {
if (isClosed() || zkClient.isClosed()) {
log.info("Bailing on becoming leader, we are closed");
return;
}
log.info("Creating leader registration node {} after winning as {}", leaderPath, leaderSeqPath);
//zkClient.printLayout();
List<Op> ops = new ArrayList<>(3);

// We use a multi operation to get the parent nodes version, which will
Expand Down

0 comments on commit c6cb6ab

Please sign in to comment.