Skip to content

Commit

Permalink
optimize: add origin error in log when write reply failed
Browse files Browse the repository at this point in the history
  • Loading branch information
ppzqh committed Aug 29, 2024
1 parent ebd3dfe commit 7676880
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/remote/trans/default_server_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (t *svrTransHandler) writeErrorReplyIfNeeded(
}
ctx, err = t.transPipe.Write(ctx, conn, errMsg)
if err != nil {
klog.CtxErrorf(ctx, "KITEX: write error reply failed, remote=%s, error=%s", conn.RemoteAddr(), err.Error())
klog.CtxErrorf(ctx, "KITEX: write error reply failed, remote=%s, error=%s, origin error=%s", conn.RemoteAddr(), err.Error(), transErr.Error())
return true
}
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/remote/trans/netpollmux/server_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ func (t *svrTransHandler) writeErrorReplyIfNeeded(
}
ctx, err = t.transPipe.Write(ctx, conn, errMsg)
if err != nil {
klog.CtxErrorf(ctx, "KITEX: write error reply failed, remote=%s, error=%s", conn.RemoteAddr(), err.Error())
klog.CtxErrorf(ctx, "KITEX: write error reply failed, remote=%s, error=%s, origin error=%s", conn.RemoteAddr(), err.Error(), transErr.Error())
return true
}
return
Expand Down

0 comments on commit 7676880

Please sign in to comment.