|
@@ -131,15 +131,6 @@ func (pm *Manager) StateChanged(id string, e libcontainerd.StateInfo) error {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
- pm.mu.RLock()
|
|
|
|
- c := pm.cMap[p]
|
|
|
|
-
|
|
|
|
- if c.exitChan != nil {
|
|
|
|
- close(c.exitChan)
|
|
|
|
- }
|
|
|
|
- restart := c.restart
|
|
|
|
- pm.mu.RUnlock()
|
|
|
|
-
|
|
|
|
os.RemoveAll(filepath.Join(pm.config.ExecRoot, id))
|
|
os.RemoveAll(filepath.Join(pm.config.ExecRoot, id))
|
|
|
|
|
|
if p.PropagatedMount != "" {
|
|
if p.PropagatedMount != "" {
|
|
@@ -152,6 +143,14 @@ func (pm *Manager) StateChanged(id string, e libcontainerd.StateInfo) error {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ pm.mu.RLock()
|
|
|
|
+ c := pm.cMap[p]
|
|
|
|
+ if c.exitChan != nil {
|
|
|
|
+ close(c.exitChan)
|
|
|
|
+ }
|
|
|
|
+ restart := c.restart
|
|
|
|
+ pm.mu.RUnlock()
|
|
|
|
+
|
|
if restart {
|
|
if restart {
|
|
pm.enable(p, c, true)
|
|
pm.enable(p, c, true)
|
|
}
|
|
}
|