mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
fix bug causing empty strings to be become non-nil errors on client side of rpc connection.
R=rsc CC=golang-dev https://golang.org/cl/155078
This commit is contained in:
parent
bcb46c8560
commit
50c04132ac
2 changed files with 9 additions and 2 deletions
|
|
@ -276,7 +276,9 @@ func sendResponse(sending *sync.Mutex, req *Request, reply interface{}, enc *gob
|
|||
resp := new(Response);
|
||||
// Encode the response header
|
||||
resp.ServiceMethod = req.ServiceMethod;
|
||||
resp.Error = errmsg;
|
||||
if errmsg != "" {
|
||||
resp.Error = errmsg
|
||||
}
|
||||
resp.Seq = req.Seq;
|
||||
sending.Lock();
|
||||
enc.Encode(resp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue