Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
shimv2: cancel monitor before stopping sandbox
Browse files Browse the repository at this point in the history
So that we don't trigger sandbox watcher on our own.

Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Aug 16, 2019
1 parent 49184ee commit 5b50b34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions containerd-shim-v2/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 5b50b34

Please sign in to comment.