api: fix graceful stop

This commit is contained in:
Jimmy Zelinskie 2016-02-01 15:42:41 -05:00
parent 9a8d4aa591
commit 6ac9b5e645

View File

@ -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.")