summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-10 13:57:39 -0400
committerGitHub <noreply@github.com>2021-05-10 13:57:39 -0400
commit76c857704053a6c6ee1e2ed1900b549d399f967d (patch)
treeee665a2b2b13c937e9b5edbdb32ec8398c2ee27c
parentfbc128ee93553d7f9fa9f665d6a3fe5b0b596e63 (diff)
parent290a58286fe26eb32441ebb65200b71e38e07f5a (diff)
downloadpodman-76c857704053a6c6ee1e2ed1900b549d399f967d.tar.gz
podman-76c857704053a6c6ee1e2ed1900b549d399f967d.tar.bz2
podman-76c857704053a6c6ee1e2ed1900b549d399f967d.zip
Merge pull request #10295 from jwhonce/issues/10154
Add client disconnect check to build handler loop
-rw-r--r--pkg/api/handlers/compat/images_build.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index ec40fdd2d..6ff557291 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -24,7 +24,7 @@ import (
"github.com/containers/podman/v3/pkg/channel"
"github.com/containers/storage/pkg/archive"
"github.com/gorilla/schema"
- specs "github.com/opencontainers/runtime-spec/specs-go"
+ "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -553,6 +553,10 @@ loop:
}
}
break loop
+ case <-r.Context().Done():
+ cancel()
+ logrus.Infof("Client disconnect reported for build %q / %q.", registry, query.Dockerfile)
+ return
}
}
}