Skip to content

Commit

Permalink
fix: client stream recv returning io.EOF is not error
Browse files Browse the repository at this point in the history
  • Loading branch information
felix021 committed Mar 7, 2024
1 parent 92f0cb7 commit 8955839
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/rpcinfo/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package rpcinfo

import (
"context"
"io"
"runtime/debug"

"github.com/cloudwego/kitex/internal"
Expand Down Expand Up @@ -74,7 +75,7 @@ func (c *TraceController) DoFinish(ctx context.Context, ri RPCInfo, err error) {
}

func buildStreamingEvent(statsEvent stats.Event, err error) Event {
if err == nil {
if err == nil || err == io.EOF {
return NewEvent(statsEvent, stats.StatusInfo, "")
} else {
return NewEvent(statsEvent, stats.StatusError, err.Error())
Expand Down

0 comments on commit 8955839

Please sign in to comment.