api: correctly set the container stats
override the outer scope variable instead of creating a local one.
Otherwise the wrong variable would be used for the next iterations.
@@ -97,7 +97,7 @@ streamLabel: // A label to flatten the scope
default:
// Container stats
- stats, err := ctnr.GetContainerStats(stats)
+ stats, err = ctnr.GetContainerStats(stats)
if err != nil {
logrus.Errorf("Unable to get container stats: %v", err)
return
