diff --git a/cmd/containerd-shim-runhcs-v1/task_hcs.go b/cmd/containerd-shim-runhcs-v1/task_hcs.go index 4a8fb82b90..fcbd82f6ca 100644 --- a/cmd/containerd-shim-runhcs-v1/task_hcs.go +++ b/cmd/containerd-shim-runhcs-v1/task_hcs.go @@ -778,7 +778,8 @@ func (ht *hcsTask) close(ctx context.Context) { log.G(ctx).WithError(err).Error("failed to wait for container shutdown") } case <-t.C: - log.G(ctx).WithError(hcs.ErrTimeout).Error("failed to wait for container shutdown") + err = hcs.ErrTimeout + log.G(ctx).WithError(err).Error("failed to wait for container shutdown") } }