1
0
mirror of https://github.com/golang/go synced 2024-11-20 05:54:43 -07:00
go/src/pkg/rpc
Aron Nopanen c51ee432d1 Make non-errored RPC calls return 'nil' error to caller.
Error information is carried from RPC server to client in the string
'Error' field of rpc.Response. An empty string is sent in the success
case. This empty string was being returned to the caller (of Client.Call
or Client.Go), resulting in a non-nil error response.

This change detects an empty-string Response.Error at the client, and
translates it into a nil value in Call.Error.

Tests updated to check error return in success cases.

R=r, rsc
https://golang.org/cl/154159
2009-11-17 11:29:02 -08:00
..
client.go fix bug causing empty strings to be become non-nil errors on client side of rpc connection. 2009-11-16 23:32:16 -08:00
debug.go remove semis after statements in one-statement statement lists 2009-11-09 12:07:39 -08:00
Makefile convert non-low-level non-google pkg code 2009-08-12 13:19:17 -07:00
server_test.go Make non-errored RPC calls return 'nil' error to caller. 2009-11-17 11:29:02 -08:00
server.go fix bug causing empty strings to be become non-nil errors on client side of rpc connection. 2009-11-16 23:32:16 -08:00