summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/pods.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-12-07 09:06:03 -0800
committerGitHub <noreply@github.com>2018-12-07 09:06:03 -0800
commit5073638d83b4f466fda434e6a06ad8bab9eef321 (patch)
treed33bd9755a879f27b446c9eb2a80613894cbaff7 /pkg/varlinkapi/pods.go
parentd266460f7bdd8d49835c8228fe16706915f92796 (diff)
parent52098941000794180a358a6983237cc6c4d30fc1 (diff)
downloadpodman-5073638d83b4f466fda434e6a06ad8bab9eef321.tar.gz
podman-5073638d83b4f466fda434e6a06ad8bab9eef321.tar.bz2
podman-5073638d83b4f466fda434e6a06ad8bab9eef321.zip
Merge pull request #1953 from baude/podstoptimeout
add timeout to pod stop
Diffstat (limited to 'pkg/varlinkapi/pods.go')
-rw-r--r--pkg/varlinkapi/pods.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/varlinkapi/pods.go b/pkg/varlinkapi/pods.go
index 7930a956f..461371497 100644
--- a/pkg/varlinkapi/pods.go
+++ b/pkg/varlinkapi/pods.go
@@ -120,12 +120,12 @@ func (i *LibpodAPI) StartPod(call iopodman.VarlinkCall, name string) error {
}
// StopPod ...
-func (i *LibpodAPI) StopPod(call iopodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) StopPod(call iopodman.VarlinkCall, name string, timeout int64) error {
pod, err := i.Runtime.LookupPod(name)
if err != nil {
return call.ReplyPodNotFound(name)
}
- ctrErrs, err := pod.Stop(getContext(), true)
+ ctrErrs, err := pod.StopWithTimeout(getContext(), true, int(timeout))
callErr := handlePodCall(call, pod, ctrErrs, err)
if callErr != nil {
return err