Skip to content

Commit

Permalink
Update cluster.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelvlach committed Sep 5, 2024
1 parent 3a219e1 commit 4400c16
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions agdb_server/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,8 @@ async fn election(cluster: &Cluster) -> ServerResult<()> {

{
let mut data = cluster.data.write().await;
data.state = ClusterState::Candidate;
election_term = data.term + 1;
data.term = election_term;
data.state = ClusterState::Candidate;
data.voted = election_term;
}

Expand Down

0 comments on commit 4400c16

Please sign in to comment.