cli: fatal error if rpc could not be started

This commit is contained in:
zelig
2015-04-22 00:47:17 +01:00
parent 7b2f25b578
commit 6512b23b98
2 changed files with 5 additions and 3 deletions

View File

@ -354,7 +354,9 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
}
// Start auxiliary services if enabled.
if ctx.GlobalBool(utils.RPCEnabledFlag.Name) {
utils.StartRPC(eth, ctx)
if err := utils.StartRPC(eth, ctx); err != nil {
utils.Fatalf("Error starting RPC: %v", err)
}
}
if ctx.GlobalBool(utils.MiningEnabledFlag.Name) {
eth.StartMining()