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

Fix deadlock on v1 plugin with activate error

When a plugin has an activation error, it was not being checked in the
`waitActive` loop. This means it will just wait forever for a manifest
to be populated even though it may never come.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2017-01-24 11:08:13 -05:00
parent 34d0619074
commit f2d384fca6
2 changed files with 8 additions and 1 deletions

View file

@ -169,7 +169,7 @@ func (p *Plugin) activateWithLock() error {
func (p *Plugin) waitActive() error {
p.activateWait.L.Lock()
for !p.activated() {
for !p.activated() && p.activateErr == nil {
p.activateWait.Wait()
}
p.activateWait.L.Unlock()