diff --git a/oci/spec_opts.go b/oci/spec_opts.go index 0769d511f..84a589933 100644 --- a/oci/spec_opts.go +++ b/oci/spec_opts.go @@ -774,6 +774,7 @@ func removeCap(caps *[]string, s string) { for i, c := range *caps { if c == s { *caps = append((*caps)[:i], (*caps)[i+1:]...) + return } } } diff --git a/task.go b/task.go index c81aa37f7..1688b0a1f 100644 --- a/task.go +++ b/task.go @@ -521,6 +521,9 @@ func (t *task) Update(ctx context.Context, opts ...UpdateTaskOpts) error { } func (t *task) LoadProcess(ctx context.Context, id string, ioAttach cio.Attach) (Process, error) { + if id == t.id && ioAttach == nil { + return t, nil + } response, err := t.client.TaskService().Get(ctx, &tasks.GetRequest{ ContainerID: t.id, ExecID: id,