mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-07-19 03:11:41 +02:00
Wait for close of done channel, to ensure manager finished.
This commit is contained in:
@@ -81,6 +81,7 @@ func (sm *sinkManager) Start() {
|
||||
s.Close()
|
||||
}
|
||||
|
||||
close(sm.done)
|
||||
cclog.ComponentDebug("SinkManager", "DONE")
|
||||
}
|
||||
|
||||
@@ -149,6 +150,8 @@ func (sm *sinkManager) AddOutput(rawConfig json.RawMessage) error {
|
||||
func (sm *sinkManager) Close() {
|
||||
cclog.ComponentDebug("SinkManager", "CLOSE")
|
||||
sm.done <- true
|
||||
// wait for close of channel sm.done
|
||||
<-sm.done
|
||||
}
|
||||
|
||||
// New creates a new initialized sink manager
|
||||
|
Reference in New Issue
Block a user