fix lock bug for componentGlobalsRegistry
Signed-off-by: Siyuan Zhang <sizhang@google.com> Kubernetes-commit: d31aebe57224b678a0c17df7766d8e7f850209e8
This commit is contained in:
parent
aa4d1a9cc7
commit
6f7147fc9d
|
|
@ -135,8 +135,8 @@ func NewComponentGlobalsRegistry() *componentGlobalsRegistry {
|
|||
}
|
||||
|
||||
func (r *componentGlobalsRegistry) Reset() {
|
||||
r.mutex.RLock()
|
||||
defer r.mutex.RUnlock()
|
||||
r.mutex.Lock()
|
||||
defer r.mutex.Unlock()
|
||||
r.componentGlobals = make(map[string]*ComponentGlobals)
|
||||
r.emulationVersionConfig = nil
|
||||
r.featureGatesConfig = nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue