We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47cb899 commit ced33cbCopy full SHA for ced33cb
go/internal/jsonrpc2/jsonrpc2.go
@@ -4,8 +4,10 @@ import (
4
"bufio"
5
"crypto/rand"
6
"encoding/json"
7
+ "errors"
8
"fmt"
9
"io"
10
+ "os"
11
"reflect"
12
"sync"
13
"sync/atomic"
@@ -306,7 +308,7 @@ func (c *Client) readLoop() {
306
308
line, err := reader.ReadString('\n')
307
309
if err != nil {
310
// Only log unexpected errors (not EOF or closed pipe during shutdown)
- if err != io.EOF && c.running.Load() {
311
+ if err != io.EOF && !errors.Is(err, os.ErrClosed) && c.running.Load() {
312
fmt.Printf("Error reading header: %v\n", err)
313
}
314
return
0 commit comments