mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-26 10:34:24 +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.
|
||||
|
||||
if c.cType.IsSandbox() {
|
||||
// cancel watcher
|
||||
if s.monitor != nil {
|
||||
s.monitor <- nil
|
||||
}
|
||||
if err = s.sandbox.Stop(true); err != nil {
|
||||
logrus.WithField("sandbox", s.sandbox.ID()).Error("failed to stop sandbox")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user