Skip to content

Commit 5eb7c9b

Browse files
Merge pull request jenningsloy318#46 from arnaldomf/fix-collector_duration_seconds-measurement
fix: collector_duration_seconds metric
2 parents 3985101 + 0cdfc4a commit 5eb7c9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collector/redfish_collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ func (r *RedfishCollector) Collect(ch chan<- prometheus.Metric) {
8686
wg := &sync.WaitGroup{}
8787
wg.Add(len(r.collectors))
8888

89-
defer wg.Wait()
9089
for _, collector := range r.collectors {
9190
go func(collector prometheus.Collector) {
9291
defer wg.Done()
9392
collector.Collect(ch)
9493
}(collector)
9594
}
95+
wg.Wait()
9696
} else {
9797
r.redfishUp.Set(0)
9898
}

0 commit comments

Comments
 (0)