mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #40867 from BurtonQin/double-lock
plugin: Add No-Lock version of resolvePluginID to fix double Rlock
This commit is contained in:
commit
8e2e2bdb9b
1 changed files with 1 additions and 3 deletions
|
@ -249,10 +249,8 @@ func (ps *Store) CallHandler(p *v2.Plugin) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// resolvePluginID must be protected by ps.RLock
|
||||||
func (ps *Store) resolvePluginID(idOrName string) (string, error) {
|
func (ps *Store) resolvePluginID(idOrName string) (string, error) {
|
||||||
ps.RLock() // todo: fix
|
|
||||||
defer ps.RUnlock()
|
|
||||||
|
|
||||||
if validFullID.MatchString(idOrName) {
|
if validFullID.MatchString(idOrName) {
|
||||||
return idOrName, nil
|
return idOrName, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue