non-blocking sending votes

pull/820/head
Xiang Li 2013-07-01 08:50:31 -07:00
parent a6a3f76ea1
commit dac781172e
1 changed files with 1 additions and 1 deletions

View File

@ -625,7 +625,7 @@ func (s *Server) promote() (bool, error) {
req := NewRequestVoteRequest(term, s.name, lastLogIndex, lastLogTerm)
for _, peer := range s.peers {
peer.sendVoteRequest(req, c)
go peer.sendVoteRequest(req, c)
}
elected, timeout := s.collectVotes(c)