Merge pull request #46 from thaJeztah/adjust_for_grpc_1.23

Client.Call(): do not return error if no Status is set (gRPC v1.23 and up)
This commit is contained in:
Derek McGowan 2019-08-26 14:00:47 -07:00 committed by GitHub
commit 1ab4dfb4c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,11 +134,11 @@ func (c *Client) Call(ctx context.Context, service, method string, req, resp int
return err
}
if cresp.Status == nil {
return errors.New("no status provided on response")
if cresp.Status != nil {
return status.ErrorProto(cresp.Status)
}
return status.ErrorProto(cresp.Status)
return nil
}
func (c *Client) dispatch(ctx context.Context, req *Request, resp *Response) error {