Skip to content

Commit

Permalink
Fix "forget who we voted for" bug
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-scott committed Aug 5, 2015
1 parent 67e0601 commit ef443f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private[protocol] trait StateMetadata extends Serializable {
def withVoteFor(term: Term, candidate: ActorRef) = copy(votes = votes + (term -> candidate))

def forLeader: LeaderMeta = LeaderMeta(clusterSelf, currentTerm, config)
def forFollower(term:Term=currentTerm): Meta = Meta(clusterSelf, term, config, Map.empty)
def forFollower(term:Term=currentTerm): Meta = Meta(clusterSelf, term, config, votes)
def forNewElection: ElectionMeta = this.forFollower().forNewElection
}

Expand Down

0 comments on commit ef443f5

Please sign in to comment.