Use non-blocking send at close

This commit is contained in:
Thomas Roehl 2022-01-26 16:52:56 +01:00
parent 09b7538479
commit babd7a9af8

View File

@ -150,7 +150,10 @@ func (cm *collectorManager) AddOutput(output chan lp.CCMetric) {
// Close finishes / stops the metric collector manager
func (cm *collectorManager) Close() {
cm.done <- true
select {
case cm.done <- true:
default:
}
cclog.ComponentDebug("CollectorManager", "CLOSE")
}