diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-08 17:29:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 17:29:00 +0200 |
commit | 5824f06d4b3ad4359a076be57192c523eb1c695d (patch) | |
tree | 2abec0e5f76f1ac83a130cfc92f7697651017167 | |
parent | 9a3a7327fdafaac66c99130a6729e4bcde8df0b0 (diff) | |
parent | c60548279162d5d313b6f2f2dbf50e9a514e23a1 (diff) | |
download | podman-5824f06d4b3ad4359a076be57192c523eb1c695d.tar.gz podman-5824f06d4b3ad4359a076be57192c523eb1c695d.tar.bz2 podman-5824f06d4b3ad4359a076be57192c523eb1c695d.zip |
Merge pull request #10599 from Luap99/remote-pull-cancel
remote pull: cancel pull when connection is closed
-rw-r--r-- | pkg/api/handlers/libpod/images_pull.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/libpod/images_pull.go b/pkg/api/handlers/libpod/images_pull.go index fe56aa31d..e88b53a4b 100644 --- a/pkg/api/handlers/libpod/images_pull.go +++ b/pkg/api/handlers/libpod/images_pull.go @@ -85,7 +85,7 @@ func ImagesPull(w http.ResponseWriter, r *http.Request) { var pulledImages []*libimage.Image var pullError error - runCtx, cancel := context.WithCancel(context.Background()) + runCtx, cancel := context.WithCancel(r.Context()) go func() { defer cancel() pulledImages, pullError = runtime.LibimageRuntime().Pull(runCtx, query.Reference, config.PullPolicyAlways, pullOptions) |