mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Merge pull request #11343 from hqhq/hq_fix_panic_error
fix panic error when docker stats a stopped container
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user