X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/31779a06b28e21a9409ec7c6310f0871b65d13ff..461fdaa1b96142b8065c131ae0334046fc71ea56:/lib/crunchrun/docker.go diff --git a/lib/crunchrun/docker.go b/lib/crunchrun/docker.go index 1fd8c4fd25..4f449133f3 100644 --- a/lib/crunchrun/docker.go +++ b/lib/crunchrun/docker.go @@ -199,7 +199,7 @@ func (e *dockerExecutor) Pid() int { ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(10*time.Second)) defer cancel() ctr, err := e.dockerclient.ContainerInspect(ctx, e.containerID) - if err != nil && ctr.State != nil { + if err == nil && ctr.State != nil { return ctr.State.Pid } else { return 0