consume agentReady when metrics are off

This commit is contained in:
marco 2024-02-12 16:42:11 +01:00
parent 465f0c64db
commit 25561482c2

View file

@ -52,7 +52,12 @@ func StartRunSvc() error {
registerPrometheus(cConfig.Prometheus)
go servePrometheus(cConfig.Prometheus, dbClient, agentReady)
} // XXX: avoid leaking agentReady
} else {
// avoid leaking the channel
go func() {
<-agentReady
}()
}
return Serve(cConfig, agentReady)
}