mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix: health check always returning not ready
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user