Explorar el Código

Merge branch 'lrita-add_missing_change'

mihasya hace 6 años
padre
commit
a667ec2489
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      registry.go

+ 2 - 2
registry.go

@@ -212,8 +212,8 @@ func (r *StandardRegistry) register(name string, i interface{}) error {
 }
 
 func (r *StandardRegistry) registered() map[string]interface{} {
-	r.mutex.Lock()
-	defer r.mutex.Unlock()
+	r.mutex.RLock()
+	defer r.mutex.RUnlock()
 	metrics := make(map[string]interface{}, len(r.metrics))
 	for name, i := range r.metrics {
 		metrics[name] = i