cli/command/container: RunStats: gracefully handle io.EOF

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-28 12:08:55 +01:00
parent 15b422b317
commit d309027d58
+1 -1
View File
@@ -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