From d309027d58238413faa9d492fd26854db1bf5d51 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 28 Oct 2025 11:09:21 +0100 Subject: [PATCH] cli/command/container: RunStats: gracefully handle io.EOF Signed-off-by: Sebastiaan van Stijn --- cli/command/container/stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/container/stats.go b/cli/command/container/stats.go index 2b76643caf..86ac9a79a7 100644 --- a/cli/command/container/stats.go +++ b/cli/command/container/stats.go @@ -332,7 +332,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions) return nil } case err, ok := <-closeChan: - if !ok || err == nil || errors.Is(err, io.ErrUnexpectedEOF) { + if !ok || err == nil || errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { // Suppress "unexpected EOF" errors in the CLI so that // it shuts down cleanly when the daemon restarts. return nil