mirror of
https://github.com/rancher/norman.git
synced 2025-09-23 20:18:51 +00:00
Fix doSchema lock issue
This commit is contained in:
@@ -327,11 +327,9 @@ func (s *Schemas) doSchema(version *APIVersion, name string, lock bool) *Schema
|
|||||||
|
|
||||||
if lock {
|
if lock {
|
||||||
s.Lock()
|
s.Lock()
|
||||||
|
defer s.Unlock()
|
||||||
}
|
}
|
||||||
schemas, ok := s.schemasByPath[path]
|
schemas, ok := s.schemasByPath[path]
|
||||||
if lock {
|
|
||||||
s.Unlock()
|
|
||||||
}
|
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user