api: fix graceful stop

pull/71/head
Jimmy Zelinskie 8 years ago
parent 9a8d4aa591
commit 6ac9b5e645

@ -69,6 +69,8 @@ func Run(config *config.APIConfig, ctx *context.RouteContext, st *utils.Stopper)
}
func RunHealth(config *config.APIConfig, ctx *context.RouteContext, st *utils.Stopper) {
defer st.End()
// Do not run the API service if there is no config.
if config == nil {
log.Infof("health API service is disabled.")

Loading…
Cancel
Save