Skip to content

Commit a22f93b

Browse files
Merge pull request #50 from rumeshmadhusanka/rumesh
Fix: Leader election
2 parents 48fe503 + 36fac17 commit a22f93b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main/java/Consensus/LeaderElection.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ public static void sendElectedMessage(Collection<String> repliedIds) {
137137
}
138138

139139
public static void respondToElectedMessage() {
140+
ServerState.getServerState().setCurrentLeader(new Leader(ServerState.getServerState().getServerFromId(getThisServerId())));
140141
announceToTheWorld();
141142
}
142143

0 commit comments

Comments
 (0)