mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 16:57:18 +00: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:
parent
49184ee562
commit
5b50b34df4
@ -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")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user