summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/attach.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-02 12:36:04 -0400
committerGitHub <noreply@github.com>2020-07-02 12:36:04 -0400
commit22def2e2d98fd2ac4f6709bd094ee66bda9c648b (patch)
tree7e795ae88a3df174bb7d399a115c2178ec4fd93b /pkg/varlinkapi/attach.go
parentc131567401bea2867d597d79cce75b99012e64fb (diff)
parent9e4cf6ca513fa0646f33ade14955e1fc4335e176 (diff)
downloadpodman-22def2e2d98fd2ac4f6709bd094ee66bda9c648b.tar.gz
podman-22def2e2d98fd2ac4f6709bd094ee66bda9c648b.tar.bz2
podman-22def2e2d98fd2ac4f6709bd094ee66bda9c648b.zip
Merge pull request #6838 from mheon/fix_panic_events
Fix `system service` panic from early hangup in events
Diffstat (limited to 'pkg/varlinkapi/attach.go')
-rw-r--r--pkg/varlinkapi/attach.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/varlinkapi/attach.go b/pkg/varlinkapi/attach.go
index db977ee5c..2a54d63b5 100644
--- a/pkg/varlinkapi/attach.go
+++ b/pkg/varlinkapi/attach.go
@@ -4,6 +4,7 @@ package varlinkapi
import (
"bufio"
+ "context"
"io"
"github.com/containers/libpod/libpod"
@@ -89,7 +90,7 @@ func (i *VarlinkAPI) Attach(call iopodman.VarlinkCall, name string, detachKeys s
if ecode, err := ctr.Wait(); err != nil {
if errors.Cause(err) == define.ErrNoSuchCtr {
// Check events
- event, err := i.Runtime.GetLastContainerEvent(ctr.ID(), events.Exited)
+ event, err := i.Runtime.GetLastContainerEvent(context.Background(), ctr.ID(), events.Exited)
if err != nil {
logrus.Errorf("Cannot get exit code: %v", err)
exitCode = define.ExecErrorCodeNotFound