mirror of
https://github.com/golang/go
synced 2024-11-22 04:54:42 -07:00
rpc: catch errors from ReadResponseBody.
Fixes #1014. R=rsc CC=golang-dev https://golang.org/cl/1941041
This commit is contained in:
parent
b0d0de59a1
commit
2bf8741c0f
@ -94,10 +94,12 @@ func (client *Client) input() {
|
||||
client.pending[seq] = c, false
|
||||
client.mutex.Unlock()
|
||||
err = client.codec.ReadResponseBody(c.Reply)
|
||||
// Empty strings should turn into nil os.Errors
|
||||
if response.Error != "" {
|
||||
c.Error = os.ErrorString(response.Error)
|
||||
} else if err != nil {
|
||||
c.Error = err
|
||||
} else {
|
||||
// Empty strings should turn into nil os.Errors
|
||||
c.Error = nil
|
||||
}
|
||||
// We don't want to block here. It is the caller's responsibility to make
|
||||
|
Loading…
Reference in New Issue
Block a user