Skip to content

Commit e327695

Browse files
committed
Hide error when it's not useful
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent 3964d51 commit e327695

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/transport/stdio.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bufio"
55
"context"
66
"encoding/json"
7+
"errors"
78
"fmt"
89
"io"
910
"os"
@@ -237,7 +238,7 @@ func (c *Stdio) readResponses() {
237238
default:
238239
line, err := c.stdout.ReadString('\n')
239240
if err != nil {
240-
if err != io.EOF {
241+
if err != io.EOF && !errors.Is(err, context.Canceled) {
241242
fmt.Printf("Error reading response: %v\n", err)
242243
}
243244
return

0 commit comments

Comments
 (0)