forked from cerc-io/plugeth
Merge pull request #1777 from hectorchu/develop
rpc/comms: fix bug attaching the console over http
This commit is contained in:
commit
edaea69817
@ -271,13 +271,13 @@ func (self *httpClient) Send(req interface{}) error {
|
|||||||
reply, _ := ioutil.ReadAll(resp.Body)
|
reply, _ := ioutil.ReadAll(resp.Body)
|
||||||
var rpcSuccessResponse shared.SuccessResponse
|
var rpcSuccessResponse shared.SuccessResponse
|
||||||
if err = self.codec.Decode(reply, &rpcSuccessResponse); err == nil {
|
if err = self.codec.Decode(reply, &rpcSuccessResponse); err == nil {
|
||||||
self.lastRes = rpcSuccessResponse.Result
|
self.lastRes = &rpcSuccessResponse
|
||||||
self.lastErr = err
|
self.lastErr = err
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
var rpcErrorResponse shared.ErrorResponse
|
var rpcErrorResponse shared.ErrorResponse
|
||||||
if err = self.codec.Decode(reply, &rpcErrorResponse); err == nil {
|
if err = self.codec.Decode(reply, &rpcErrorResponse); err == nil {
|
||||||
self.lastRes = rpcErrorResponse.Error
|
self.lastRes = &rpcErrorResponse
|
||||||
self.lastErr = err
|
self.lastErr = err
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user