mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-02 21:11:37 +01:00
Merge pull request #7384 from kofj/fix_deadlock
fix deadlock when client not exist.
This commit is contained in:
commit
24e7019b60
@ -105,7 +105,9 @@ func NewDefaultImageRegistry(registry *model.Registry) (*DefaultImageRegistry, e
|
||||
}
|
||||
|
||||
func (d *DefaultImageRegistry) getClient(repository string) (*registry_pkg.Repository, error) {
|
||||
d.RLock()
|
||||
client, exist := d.clients[repository]
|
||||
d.RUnlock()
|
||||
if exist {
|
||||
return client, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user