Skip to content

Commit

Permalink
Fix master checks happening on failover
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Lefranc committed May 10, 2016
1 parent aeb2e97 commit 82696ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (server *ServerMonitor) electCandidate(l []*ServerMonitor) int {
hiseq := 0
var max uint64
for i, sl := range l {
if server.State != stateFailed {
if server.State != stateFailed && server.PrevState != stateMaster {
if verbose {
logprintf("DEBUG: Checking eligibility of slave server %s [%d]", sl.URL, i)
}
Expand Down

0 comments on commit 82696ce

Please sign in to comment.