fix: health check always returning not ready

This commit is contained in:
pancake
2026-06-08 12:14:06 +02:00
parent 12c36572a5
commit fac5603daf
+5
View File
@@ -222,6 +222,11 @@ func Run(debug bool, homePath, configPath string, allowEmptyStartup bool) (runEr
if err != nil { if err != nil {
return err return err
} }
// All services (channels + shared HTTP server) are up; mark the health
// server ready so GET /ready reports "ready". The health endpoints are
// mounted on the shared gateway mux, so Health.Server.Start() (which would
// otherwise set this) is never called — we flip the flag explicitly here.
runningServices.HealthServer.SetReady(true)
publishGatewayEvent(agentLoop, runtimeevents.KindGatewayReady, startedAt, nil) publishGatewayEvent(agentLoop, runtimeevents.KindGatewayReady, startedAt, nil)
closeListeners = false closeListeners = false