mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-12 21:17:25 +01:00
Use non-blocking send at close
This commit is contained in:
parent
09b7538479
commit
babd7a9af8
@ -150,7 +150,10 @@ func (cm *collectorManager) AddOutput(output chan lp.CCMetric) {
|
|||||||
|
|
||||||
// Close finishes / stops the metric collector manager
|
// Close finishes / stops the metric collector manager
|
||||||
func (cm *collectorManager) Close() {
|
func (cm *collectorManager) Close() {
|
||||||
cm.done <- true
|
select {
|
||||||
|
case cm.done <- true:
|
||||||
|
default:
|
||||||
|
}
|
||||||
cclog.ComponentDebug("CollectorManager", "CLOSE")
|
cclog.ComponentDebug("CollectorManager", "CLOSE")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user