aboutsummaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/attach.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/varlinkapi/attach.go')
-rw-r--r--pkg/varlinkapi/attach.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkg/varlinkapi/attach.go b/pkg/varlinkapi/attach.go
index db977ee5c..8acf2a1b6 100644
--- a/pkg/varlinkapi/attach.go
+++ b/pkg/varlinkapi/attach.go
@@ -4,13 +4,14 @@ package varlinkapi
import (
"bufio"
+ "context"
"io"
- "github.com/containers/libpod/libpod"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- iopodman "github.com/containers/libpod/pkg/varlink"
- "github.com/containers/libpod/pkg/varlinkapi/virtwriter"
+ "github.com/containers/libpod/v2/libpod"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ iopodman "github.com/containers/libpod/v2/pkg/varlink"
+ "github.com/containers/libpod/v2/pkg/varlinkapi/virtwriter"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"k8s.io/client-go/tools/remotecommand"
@@ -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