mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Fix for race on setting term
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1333,7 +1333,9 @@ func (n *raft) runAsCandidate() {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
n.Lock()
|
||||
n.term = vresp.term
|
||||
n.Unlock()
|
||||
n.writeTermVote()
|
||||
n.switchToFollower(noLeader)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user