Skip to content

Commit 0cdfc4a

Browse files
author
Arnaldo Mendonca
committed
fix: collector_duration_seconds metric
1 parent 3985101 commit 0cdfc4a

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)