From 77a1665c05517194c4d5b27b7e03326d4c0923c9 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 9 Apr 2018 08:55:39 -0500 Subject: Containers transitioning to stop should not break stats When a container is transitioning from running to stopped and stats is runnings, we should not break stats if we are unable to get stats for that container. Resolves: #598 Signed-off-by: baude Closes: #599 Approved by: mheon --- libpod/stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/stats.go b/libpod/stats.go index f4694923c..33e57572c 100644 --- a/libpod/stats.go +++ b/libpod/stats.go @@ -37,7 +37,7 @@ func (c *Container) GetContainerStats(previousStats *ContainerStats) (*Container c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return stats, errors.Wrapf(err, "error updating container %s state", c.ID()) + return stats, err } if c.state.State != ContainerStateRunning { return stats, nil -- cgit v1.2.3-54-g00ecf