Merge pull request #20 from temoto/patch-1

Patch 1
pull/820/head
Ben Johnson 2013-06-22 11:48:59 -07:00
commit 730cdd4d40
1 changed files with 3 additions and 5 deletions

View File

@ -189,11 +189,9 @@ func (s *Server) LastCommandName() string {
// Retrieves the number of member servers in the consensus. // Retrieves the number of member servers in the consensus.
func (s *Server) MemberCount() int { func (s *Server) MemberCount() int {
count := 1 s.mutex.Lock()
for _, _ = range s.peers { defer s.mutex.Unlock()
count++ return len(s.peers) + 1
}
return count
} }
// Retrieves the number of servers required to make a quorum. // Retrieves the number of servers required to make a quorum.