summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-02-03 07:54:12 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-02-03 07:56:13 -0500
commitd87f54fbba8cfdb7a04e50a1427cd17c8a0b06cd (patch)
tree35ff50f7bd2bf2986d21c1af234d65bb8da47167 /pkg/api/handlers/compat
parent4ce8b1281e69b55b6024e87f2dec06638c678f10 (diff)
downloadpodman-d87f54fbba8cfdb7a04e50a1427cd17c8a0b06cd.tar.gz
podman-d87f54fbba8cfdb7a04e50a1427cd17c8a0b06cd.tar.bz2
podman-d87f54fbba8cfdb7a04e50a1427cd17c8a0b06cd.zip
Fix invalid wait condition on kill
When using the compatability tests on kill, the kill function goes into an infinite wait loop taking all of the CPU. This change will use the correct wait function and exit properly. Fixes: https://github.com/containers/podman/issues/9206 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/containers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index b41987800..86508f938 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -233,8 +233,8 @@ func KillContainer(w http.ResponseWriter, r *http.Request) {
return
}
if sig == 0 || syscall.Signal(sig) == syscall.SIGKILL {
- var opts entities.WaitOptions
- if _, err := containerEngine.ContainerWait(r.Context(), []string{name}, opts); err != nil {
+ if _, err := utils.WaitContainer(w, r); err != nil {
+
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, err)
return
}