Skip to content

Commit

Permalink
Merge pull request #10599 from Luap99/remote-pull-cancel
Browse files Browse the repository at this point in the history
remote pull: cancel pull when connection is closed
  • Loading branch information
openshift-merge-robot authored Jun 8, 2021
2 parents 9a3a732 + c605482 commit 5824f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/handlers/libpod/images_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5824f06

Please sign in to comment.