mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 02:35:07 +01:00 
			
		
		
		
	Use non-blocking send at close
This commit is contained in:
		@@ -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")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user