rpc/comms: fix bug attaching the console over http

This commit is contained in:
Hector Chu 2015-09-07 15:09:59 +01:00
parent e2d7c1a523
commit 4ea81f170a

View File

@ -271,13 +271,13 @@ func (self *httpClient) Send(req interface{}) error {
reply, _ := ioutil.ReadAll(resp.Body)
var rpcSuccessResponse shared.SuccessResponse
if err = self.codec.Decode(reply, &rpcSuccessResponse); err == nil {
self.lastRes = rpcSuccessResponse.Result
self.lastRes = &rpcSuccessResponse
self.lastErr = err
return nil
} else {
var rpcErrorResponse shared.ErrorResponse
if err = self.codec.Decode(reply, &rpcErrorResponse); err == nil {
self.lastRes = rpcErrorResponse.Error
self.lastRes = &rpcErrorResponse
self.lastErr = err
return nil
} else {