From 2082908f39f3794ac2e7b5412e993fb1875529ec Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Sat, 12 Feb 2022 16:38:32 +0100 Subject: [PATCH] Improve HTTP server startup, add wrapping handler HTTP server now initializes much earlier and mounts "waiting" router with debugging, version and health check routes. When server is fully activated it switches to "active" router. Shutdown stage is also handled with catch-all route. --- pkg/api/server/handlers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/api/server/handlers.go b/pkg/api/server/handlers.go index b8de45d8c..99db4acff 100644 --- a/pkg/api/server/handlers.go +++ b/pkg/api/server/handlers.go @@ -61,6 +61,7 @@ func shutdownRoutes() (r chi.Router) { w.Header().Set("Refresh", "15; url=/") _, _ = fmt.Fprint(w, "corteza server shutting down") }) + return }