Corrected error handling and log messages

This commit is contained in:
vsmk98 2019-02-15 14:23:05 +08:00
parent 564d35f94a
commit 5953106da3
1 changed files with 7 additions and 7 deletions

View File

@ -407,12 +407,12 @@ func startQuorumPermissionService(ctx *cli.Context, stack *node.Node) {
utils.Fatalf("Failed to start Quorum Permission API %s", apiName)
}
qapi := v.(*quorum.QuorumControlsAPI)
if err != nil {
utils.Fatalf("Failed to attach to self: %v", err)
}
qapi.Init(stateReader, stack.GetNodeKey(), apiName)
log.Info("Permission API started.", "apiName", apiName)
}
log.Info("Permission API initialized")
err = qapi.Init(stateReader, stack.GetNodeKey(), apiName)
if err != nil {
log.Info("Failed to starts API", "apiName", apiName)
} else {
log.Info("API started", "apiName", apiName)
}
}
}