Merge pull request #28897 from anusha-ragunathan/plugin_exit
Fix issue with plugin exit. Upstream-commit: 584d23d8494ed07e5eb9684297eefc065ae7fedd Component: engine
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user