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

Merge pull request #28897 from anusha-ragunathan/plugin_exit

Fix issue with plugin exit.
This commit is contained in:
Tibor Vass 2016-11-28 15:25:27 -08:00 committed by GitHub
commit 584d23d849

View file

@ -26,6 +26,7 @@ func (pm *Manager) enable(p *v2.Plugin, force bool) error {
}
p.Lock()
p.Restart = true
p.ExitChan = make(chan bool)
p.Unlock()
if err := pm.containerdClient.Create(p.GetID(), "", "", specs.Spec(*spec), attachToLog(p.GetID())); err != nil {
return err
@ -92,7 +93,6 @@ func (pm *Manager) Shutdown() {
}
if pm.containerdClient != nil && p.IsEnabled() {
p.Lock()
p.ExitChan = make(chan bool)
p.Restart = false
p.Unlock()
shutdownPlugin(p, pm.containerdClient)