Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Willemt Raft
Commits
a1fbc292
Commit
a1fbc292
authored
Jan 25, 2016
by
Willem Thiart
Browse files
Fix: Do not drop if current_idx is 0
parent
29bf1bcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/raft_server.c
View file @
a1fbc292
...
@@ -176,7 +176,7 @@ int raft_recv_appendentries_response(raft_server_t* me_,
...
@@ -176,7 +176,7 @@ int raft_recv_appendentries_response(raft_server_t* me_,
r
->
first_idx
);
r
->
first_idx
);
/* Stale response -- ignore */
/* Stale response -- ignore */
if
(
r
->
current_idx
<=
raft_node_get_match_idx
(
node
))
if
(
r
->
current_idx
!=
0
&&
r
->
current_idx
<=
raft_node_get_match_idx
(
node
))
return
0
;
return
0
;
if
(
!
raft_is_leader
(
me_
))
if
(
!
raft_is_leader
(
me_
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment