Merge pull request #11343 from hqhq/hq_fix_panic_error

fix panic error when docker stats a stopped container
This commit is contained in:
Michael Crosby
2015-03-16 15:16:03 -07:00
2 changed files with 30 additions and 1 deletions
+3
View File
@@ -315,6 +315,9 @@ func (d *driver) Clean(id string) error {
func (d *driver) Stats(id string) (*execdriver.ResourceStats, error) {
c := d.activeContainers[id]
if c == nil {
return nil, execdriver.ErrNotRunning
}
now := time.Now()
stats, err := c.Stats()
if err != nil {