diff --git a/api/api.go b/api/api.go index d65e646b..25f94eee 100644 --- a/api/api.go +++ b/api/api.go @@ -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.")