rpc: support returning nil pointer big.Ints (null)

This commit is contained in:
Péter Szilágyi
2018-06-11 13:15:59 +03:00
parent 1d666cf27e
commit 99483e85b9
4 changed files with 7 additions and 31 deletions

View File

@ -313,7 +313,6 @@ func (s *Server) handle(ctx context.Context, codec ServerCodec, req *serverReque
if len(reply) == 0 {
return codec.CreateResponse(req.id, nil), nil
}
if req.callb.errPos >= 0 { // test if method returned an error
if !reply[req.callb.errPos].IsNil() {
e := reply[req.callb.errPos].Interface().(error)