diff --git a/cmd/containerd-stress/main.go b/cmd/containerd-stress/main.go index 522fc7400..4d236dcaf 100644 --- a/cmd/containerd-stress/main.go +++ b/cmd/containerd-stress/main.go @@ -239,9 +239,9 @@ func (w *worker) runContainer(ctx context.Context, id string) error { logrus.WithError(err).Error("exec failure") } } - } - if err := task.Kill(ctx, syscall.SIGKILL); err != nil { - return err + if err := task.Kill(ctx, syscall.SIGKILL); err != nil { + return err + } } status := <-statusC _, _, err = status.Result()