1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

plugin: remove Rlock in resolvePluginID to fix double Rlock

Signed-off-by: BurtonQin <bobbqqin@gmail.com>
This commit is contained in:
BurtonQin 2020-04-28 11:37:35 -04:00
parent 45369c61a4
commit a36db14ce0

View file

@ -248,10 +248,8 @@ func (ps *Store) CallHandler(p *v2.Plugin) {
}
}
// resolvePluginID must be protected by ps.RLock
func (ps *Store) resolvePluginID(idOrName string) (string, error) {
ps.RLock() // todo: fix
defer ps.RUnlock()
if validFullID.MatchString(idOrName) {
return idOrName, nil
}