mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-24 16:54:26 +01:00
shimv2: cancel monitor before stopping sandbox
So that we don't trigger sandbox watcher on our own. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
@@ -53,6 +53,10 @@ func wait(s *service, c *container, execID string) (int32, error) {
|
|||||||
// sandbox.
|
// sandbox.
|
||||||
|
|
||||||
if c.cType.IsSandbox() {
|
if c.cType.IsSandbox() {
|
||||||
|
// cancel watcher
|
||||||
|
if s.monitor != nil {
|
||||||
|
s.monitor <- nil
|
||||||
|
}
|
||||||
if err = s.sandbox.Stop(true); err != nil {
|
if err = s.sandbox.Stop(true); err != nil {
|
||||||
logrus.WithField("sandbox", s.sandbox.ID()).Error("failed to stop sandbox")
|
logrus.WithField("sandbox", s.sandbox.ID()).Error("failed to stop sandbox")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user