Skip to content

Commit

Permalink
fix rpc_util
Browse files Browse the repository at this point in the history
  • Loading branch information
tspiridonova committed Mar 15, 2021
1 parent da06014 commit 2a92354
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rpc_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,11 +758,10 @@ func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m interf
return err
}
if _, ok := m.(*io.PipeWriter); ok {
defer func() {
m.(*io.PipeWriter).Close()
}()
_, err = m.(*io.PipeWriter).Write(d)
if err != nil {
return err
}
err = m.(*io.PipeWriter).Close()
return err
}
if err = c.Unmarshal(d, m); err != nil {
Expand Down

0 comments on commit 2a92354

Please sign in to comment.