Skip to content

Commit d309027

Browse files
committed
cli/command/container: RunStats: gracefully handle io.EOF
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 15b422b commit d309027

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/command/container/stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions)
332332
return nil
333333
}
334334
case err, ok := <-closeChan:
335-
if !ok || err == nil || errors.Is(err, io.ErrUnexpectedEOF) {
335+
if !ok || err == nil || errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) {
336336
// Suppress "unexpected EOF" errors in the CLI so that
337337
// it shuts down cleanly when the daemon restarts.
338338
return nil

0 commit comments

Comments
 (0)