consume agentReady when metrics are off
This commit is contained in:
parent
465f0c64db
commit
25561482c2
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue