From 6ac9b5e6451abecb879ed63a446e051d206b6af6 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Mon, 1 Feb 2016 15:42:41 -0500 Subject: [PATCH] api: fix graceful stop --- api/api.go | 2 ++ 1 file changed, 2 insertions(+) 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.")