Skip to content

Commit

Permalink
[FIXED] Make sure to reset election timer on catching up (#4428)
Browse files Browse the repository at this point in the history
Thanks to @yuzhou-nj for the catch and fix.

Signed-off-by: Derek Collison <derek@nats.io>

Resolves #4363
  • Loading branch information
derekcollison committed Aug 25, 2023
2 parents c9b5b32 + 2669f77 commit 5a49727
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/raft.go
Expand Up @@ -1814,6 +1814,7 @@ func (n *raft) runAsFollower() {
if n.catchupStalled() {
n.cancelCatchup()
}
n.resetElectionTimeout()
n.Unlock()
} else {
n.switchToCandidate()
Expand Down

0 comments on commit 5a49727

Please sign in to comment.