Allow to shutdown redfish receiver during metric read

This commit is contained in:
Holger Obermaier 2022-04-20 09:58:02 +02:00
parent 31c5c89a5a
commit 8c73095548

View File

@ -146,7 +146,17 @@ func (r *RedfishReceiver) Start() {
}
// Distribute client configs to workers
clientConfigLoop:
for i := range r.config.ClientConfigs {
// Check done channel status
select {
case _, ok := <-r.done:
if !ok {
break clientConfigLoop
}
default:
}
workerInput <- i
}