aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-06-23 14:26:17 +0800
committerBas van Kervel <bas@ethdev.com>2015-06-23 14:26:17 +0800
commit57c911c39804ccfcf597df0acc6a03eb096d7652 (patch)
tree5724dede1fad10d7216aa657130180f6843e2b29 /rpc/api
parent4ee7f6fc88d504f2eac96de4e6e04d72032a933a (diff)
downloaddexon-57c911c39804ccfcf597df0acc6a03eb096d7652.tar.gz
dexon-57c911c39804ccfcf597df0acc6a03eb096d7652.tar.zst
dexon-57c911c39804ccfcf597df0acc6a03eb096d7652.zip
bugfix in startRPC error handling
Diffstat (limited to 'rpc/api')
-rw-r--r--rpc/api/admin.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/rpc/api/admin.go b/rpc/api/admin.go
index 7e79fd4d0..b27482cfe 100644
--- a/rpc/api/admin.go
+++ b/rpc/api/admin.go
@@ -217,7 +217,6 @@ func (self *adminApi) SetSolc(req *shared.Request) (interface{}, error) {
}
func (self *adminApi) StartRPC(req *shared.Request) (interface{}, error) {
- var err error
args := new(StartRPCArgs)
if err := self.coder.Decode(req.Params, &args); err != nil {
return nil, shared.NewDecodeParamError(err.Error())
@@ -229,14 +228,15 @@ func (self *adminApi) StartRPC(req *shared.Request) (interface{}, error) {
CorsDomain: args.CorsDomain,
}
- if apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum); err == nil {
- err = comms.StartHttp(cfg, self.codec, Merge(apis...))
+ apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum)
+ if err != nil {
+ return false, err
}
+ err = comms.StartHttp(cfg, self.codec, Merge(apis...))
if err == nil {
return true, nil
}
-
return false, err
}