From 38645ca5cea46673d35c08ce8896efe71724fe16 Mon Sep 17 00:00:00 2001 From: Sammy Libre Date: Tue, 7 Jun 2016 21:51:34 +0500 Subject: [PATCH] Fix ineffectual assignments --- proxy/proxy.go | 2 +- rpc/rpc.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/proxy/proxy.go b/proxy/proxy.go index 170d03c..1003380 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -249,7 +249,7 @@ func (cs *Session) handleMessage(s *ProxyServer, r *http.Request, req *JSONRpcRe } reply, errReply := s.handleSubmitRPC(cs, login, vars["id"], params) if errReply != nil { - err = cs.sendError(req.Id, errReply) + cs.sendError(req.Id, errReply) break } cs.sendResult(req.Id, &reply) diff --git a/rpc/rpc.go b/rpc/rpc.go index cce2597..6f306d5 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -212,6 +212,9 @@ func (r *RPCClient) GetPeerCount() (int64, error) { return 0, errors.New(rpcResp.Error["message"].(string)) } err = json.Unmarshal(*rpcResp.Result, &reply) + if err != nil { + return 0, err + } return strconv.ParseInt(strings.Replace(reply, "0x", "", -1), 16, 64) }