Skip to content

Commit

Permalink
fix: raw call also needs to return res metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiangyang committed Aug 22, 2024
1 parent 638c688 commit 050cd5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ func (client *Client) input() {
if call.Raw {
call.Metadata, call.Reply, _ = convertRes2Raw(res)
call.Metadata[XErrorMessage] = call.Error.Error()
call.ResMetadata = res.Metadata
} else if len(res.Payload) > 0 {
data := res.Payload
codec := share.Codecs[res.SerializeType()]
Expand All @@ -699,6 +700,7 @@ func (client *Client) input() {
default:
if call.Raw {
call.Metadata, call.Reply, _ = convertRes2Raw(res)
call.ResMetadata = res.Metadata
} else {
data := res.Payload
if len(data) > 0 {
Expand Down

0 comments on commit 050cd5c

Please sign in to comment.