1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

Don't unmarshal if result is nil

This commit is contained in:
Asim 2016-06-30 16:45:30 +01:00
parent 02481c4446
commit 0190b1ab3a

View File

@ -86,7 +86,7 @@ func (c *clientCodec) ReadHeader(m *codec.Message) error {
}
func (c *clientCodec) ReadBody(x interface{}) error {
if x == nil {
if x == nil || c.resp.Result == nil {
return nil
}
return json.Unmarshal(*c.resp.Result, x)