Skip to content

Commit

Permalink
Fixes intelsdi-x#1482, removed unsafe double RLock
Browse files Browse the repository at this point in the history
  • Loading branch information
katarzyna-z committed Feb 16, 2017
1 parent 85079bc commit 57f8f9c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions control/strategy/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,8 @@ func (p *pool) SubscriptionCount() int {
}

// SelectAP selects an available plugin from the pool
// the method is not thread safety, it should be protected outside of the body
func (p *pool) SelectAP(taskID string, config map[string]ctypes.ConfigValue) (AvailablePlugin, serror.SnapError) {
p.RLock()
defer p.RUnlock()

aps := p.plugins.Values()

var id string
Expand Down

0 comments on commit 57f8f9c

Please sign in to comment.