Skip to content

Commit

Permalink
check for expected EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraRodgers committed Jan 19, 2024
1 parent a4d89b2 commit 3c6e7e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/client/live/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ func (c *Client) Stream(r io.Reader) error {
return nil
default:
bytesRead, err := r.Read(chunk)
if err != nil {
if err == io.EOF && !c.retry {
klog.V(3).Infof("stream object EOF\n")
klog.V(6).Infof("live.Stream() LEAVE\n")
return nil
} else if err != nil {
klog.V(4).Infof("r.Read encountered EOF. Err: %v\n", err)
klog.V(6).Infof("live.Stream() LEAVE\n")
return err
Expand Down

0 comments on commit 3c6e7e5

Please sign in to comment.