diff --git a/exporter.go b/exporter.go index 67a54a02..93adc6a6 100644 --- a/exporter.go +++ b/exporter.go @@ -5,6 +5,7 @@ package main import ( "fmt" "net/http" + _ "net/http/pprof" "os" "sort" "strconv" @@ -144,6 +145,7 @@ func (coll WmiCollector) Collect(ch chan<- prometheus.Metric) { go func() { wg.Wait() close(allDone) + close(metricsBuffer) }() // Wait until either all collectors finish, or timeout expires