Skip to content

Commit

Permalink
(issue #29) voting algo bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
bluestreak01 committed Jan 28, 2015
1 parent bb88593 commit 3212148
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,14 @@ private void vote(boolean startup) throws JournalNetworkException {
switch (client.voteInstance(instance, activeNode)) {
case ALPHA:
LOGGER.info(thisNode() + " Lost tie-break vote, becoming a client");
server.halt();
// don't stop server explicitly, it wil shut down after being voted out
setupClient(activeNode);
return;
case THEM:
LOGGER.info("%s lost tie-break against %s, wait for ALPHA node", thisNode(), activeNode);
isClient = true;
server.halt();
break;
default:
LOGGER.info("%s WON tie-break against %s", thisNode(), activeNode);
Expand Down

0 comments on commit 3212148

Please sign in to comment.