make RequestVote RPC handler thread-safe
This commit is contained in:
parent
1054a9916e
commit
7968dbb008
@ -426,7 +426,7 @@ public class RaftCore {
|
||||
}
|
||||
}
|
||||
|
||||
public RaftPeer receivedVote(RaftPeer remote) {
|
||||
public synchronized RaftPeer receivedVote(RaftPeer remote) {
|
||||
if (!peers.contains(remote)) {
|
||||
throw new IllegalStateException("can not find peer: " + remote.ip);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user