• Aron Nopanen's avatar
    Make non-errored RPC calls return 'nil' error to caller. · c51ee432
    Aron Nopanen authored
    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
    c51ee432
server_test.go 4.85 KB