fix resource manager dead lock (#2302)
Co-authored-by: sado <liaoyonglin@bilibili.com>
This commit is contained in:
@@ -57,8 +57,8 @@ func (manager *ResourceManager) GetResource(key string, create func() (io.Closer
|
||||
}
|
||||
|
||||
manager.lock.Lock()
|
||||
defer manager.lock.Unlock()
|
||||
manager.resources[key] = resource
|
||||
manager.lock.Unlock()
|
||||
|
||||
return resource, nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user