Skip to content

Commit

Permalink
Merge pull request #872 from dickens7/feat-raw-call-return-resmetadata
Browse files Browse the repository at this point in the history
fix: raw call also needs to return res metadata
  • Loading branch information
smallnest authored Aug 22, 2024
2 parents 6663fb7 + 050cd5c commit c68df57
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 c68df57

Please sign in to comment.