Browse Source

plugin: remove Rlock in resolvePluginID to fix double Rlock

Signed-off-by: BurtonQin <bobbqqin@gmail.com>
BurtonQin 5 years ago
parent
commit
a36db14ce0
1 changed files with 1 additions and 3 deletions
  1. 1 3
      plugin/store.go

+ 1 - 3
plugin/store.go

@@ -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
 	}