From 2567a94a817aed53b138d7c37e7a123b0ba005df Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Tue, 26 Sep 2017 13:40:26 +0200 Subject: [PATCH] serf: monkey patch https://github.com/hashicorp/serf/pull/486 --- vendor/github.com/hashicorp/serf/serf/serf.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/github.com/hashicorp/serf/serf/serf.go b/vendor/github.com/hashicorp/serf/serf/serf.go index 7256eafab1..5940a67940 100644 --- a/vendor/github.com/hashicorp/serf/serf/serf.go +++ b/vendor/github.com/hashicorp/serf/serf/serf.go @@ -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))),