diff --git a/app/server.go b/app/server.go index e6a7b9d78d..3850b47793 100644 --- a/app/server.go +++ b/app/server.go @@ -332,10 +332,6 @@ func (s *Server) Shutdown() error { s.StopHTTPServer() s.WaitForGoroutines() - if s.Store != nil { - s.Store.Close() - } - if s.htmlTemplateWatcher != nil { s.htmlTemplateWatcher.Close() } @@ -358,6 +354,10 @@ func (s *Server) Shutdown() error { s.Jobs.StopSchedulers() } + if s.Store != nil { + s.Store.Close() + } + mlog.Info("Server stopped") return nil }