diff --git a/private/registry/registry.go b/private/registry/registry.go index bd4f899..46d8f30 100644 --- a/private/registry/registry.go +++ b/private/registry/registry.go @@ -41,10 +41,10 @@ func NewServiceRegistry() (*serviceRegistry, error) { func (r *serviceRegistry) Reset() error { r.lock.Lock() - defer r.lock.Unlock() r.services = map[string]protoreflect.ServiceDescriptor{} r.files = new(protoregistry.Files) r.filesOrdered = []protoreflect.FileDescriptor{} + r.lock.Unlock() return AddServicesFromGlobal(r) }