summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-05-10 09:16:25 -0700
committerJhon Honce <jhonce@redhat.com>2021-05-10 09:46:40 -0700
commit290a58286fe26eb32441ebb65200b71e38e07f5a (patch)
treeee665a2b2b13c937e9b5edbdb32ec8398c2ee27c /pkg
parentfbc128ee93553d7f9fa9f665d6a3fe5b0b596e63 (diff)
downloadpodman-290a58286fe26eb32441ebb65200b71e38e07f5a.tar.gz
podman-290a58286fe26eb32441ebb65200b71e38e07f5a.tar.bz2
podman-290a58286fe26eb32441ebb65200b71e38e07f5a.zip
Add client disconnect to build handler loop
[NO TESTS NEEDED] In process of debugging added request channel check and logging message to build loop. Unable to recreate build drop issue after this. 68k build iterations without fail. Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg')
-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
}
}
}