Fix error log when kill shim

Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
Shiming Zhang 2021-03-19 19:01:16 +08:00
parent 2d5f9bf870
commit fe787efa2b

View File

@ -219,7 +219,7 @@ func (r *Runtime) Create(ctx context.Context, id string, opts runtime.CreateOpts
namespaces.WithNamespace(context.TODO(), namespace), cleanupTimeout) namespaces.WithNamespace(context.TODO(), namespace), cleanupTimeout)
defer deferCancel() defer deferCancel()
if kerr := s.KillShim(deferCtx); kerr != nil { if kerr := s.KillShim(deferCtx); kerr != nil {
log.G(ctx).WithError(err).Error("failed to kill shim") log.G(ctx).WithError(kerr).Error("failed to kill shim")
} }
} }
}() }()