This commit is contained in:
Frank Schroeder 2017-09-26 13:40:26 +02:00
parent 20a58ab272
commit 1530f12f56
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 2 additions and 0 deletions

View File

@ -1654,6 +1654,8 @@ func (s *Serf) Stats() map[string]string {
toString := func(v uint64) string {
return strconv.FormatUint(v, 10)
}
s.memberLock.RLock()
defer s.memberLock.RUnlock()
stats := map[string]string{
"members": toString(uint64(len(s.members))),
"failed": toString(uint64(len(s.failedMembers))),