Use state for container create
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
9344ea9d7d
commit
6fae7fd8fc
1 changed files with 1 additions and 5 deletions
|
@ -252,11 +252,7 @@ func createAPIContainer(c runtime.Container, getPids bool) (*types.Container, er
|
|||
procs = append(procs, proc)
|
||||
}
|
||||
var pids []int
|
||||
state, err := c.Status()
|
||||
if err != nil {
|
||||
return nil, grpc.Errorf(codes.Internal, "get status for container: "+err.Error())
|
||||
}
|
||||
|
||||
state := c.State()
|
||||
if getPids && (state == runtime.Running || state == runtime.Paused) {
|
||||
if pids, err = c.Pids(); err != nil {
|
||||
return nil, grpc.Errorf(codes.Internal, "get all pids for container: "+err.Error())
|
||||
|
|
Loading…
Reference in a new issue