mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Commit fd0e24b7189374e0fe7c55b6d26ee916d3ee1655 changed the stats collection loop to use a `sleep()` instead of `time.Tick()` in the for-loop. This change caused a regression in situations where no stats are being collected, or an error is hit in the loop (in which case the loop would `continue`, and the `sleep()` is not hit). This patch puts the sleep at the start of the loop to guarantee it's always hit. This will delay the sampling, which is similar to the behavior before fd0e24b7189374e0fe7c55b6d26ee916d3ee1655. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 481b8e54b45955e40075f49a9af321afce439320 Component: engine