Skip to content

Commit

Permalink
Ensure that empty mesos containers reference as a failure to fetch co…
Browse files Browse the repository at this point in the history
…ntainers
  • Loading branch information
sashankreddya committed Sep 14, 2018
1 parent b36e6fb commit ec4f24e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions container/mesos/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ func (self *client) getContainers() (mContainers, error) {
return nil, fmt.Errorf("failed to get mesos containers: %v", err)
}
cntrs := result.GetContainers

if cntrs == nil {
return nil, fmt.Errorf("failed to get mesos containers")
}
return cntrs, nil
}

Expand Down

0 comments on commit ec4f24e

Please sign in to comment.