Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion go/internal/jsonrpc2/jsonrpc2.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import (
"bufio"
"crypto/rand"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"reflect"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -306,7 +308,7 @@ func (c *Client) readLoop() {
line, err := reader.ReadString('\n')
if err != nil {
// Only log unexpected errors (not EOF or closed pipe during shutdown)
if err != io.EOF && c.running.Load() {
if err != io.EOF && !errors.Is(err, os.ErrClosed) && c.running.Load() {
fmt.Printf("Error reading header: %v\n", err)
}
return
Expand Down
Loading