error when GetStats() return nil, nil

This commit is contained in:
Nan Deng 2014-06-12 17:37:49 -07:00
parent 90fc23fe61
commit 30baa98167

View File

@ -63,10 +63,8 @@ func (self *percentilesContainerHandlerWrapper) GetStats() (*info.ContainerStats
if err != nil {
return nil, err
}
// nil stats and nil error is possible for /docker container.
if stats == nil {
// return nil, fmt.Errorf("container handler returns a nil error and a nil stats")
return nil, nil
return nil, fmt.Errorf("container handler returns a nil error and a nil stats")
}
if stats.Timestamp.IsZero() {
return nil, fmt.Errorf("container handler did not set timestamp")