From 180ed082fd5fbbb1e423eb0eb9d24acafc5792d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 1 Sep 2022 12:58:36 +0200 Subject: [PATCH] c8d/progress: Don't use cancelled context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- daemon/containerd/progress.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/containerd/progress.go b/daemon/containerd/progress.go index 81e039b6fe7a6..6b9bb1187cc22 100644 --- a/daemon/containerd/progress.go +++ b/daemon/containerd/progress.go @@ -54,6 +54,9 @@ func showProgress(ctx context.Context, ongoing *jobs, w io.Writer, updateFunc up return } case <-ctx.Done(): + // Don't use the context that is already done. + // Perform the last update with a new context. + ctx := context.Background() updateFunc(ctx, ongoing, out, start) return }