mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2157 from yichengq/309
pkg/metrics: protect global vars in reset func
This commit is contained in:
commit
825107629a
@ -158,6 +158,8 @@ func Do(f func(expvar.KeyValue)) {
|
||||
|
||||
// for test only
|
||||
func reset() {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
vars = make(map[string]expvar.Var)
|
||||
varKeys = nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user