mirror of
https://codeberg.org/scip/io-exporter.git
synced 2025-12-17 12:31:03 +01:00
add waitgroup for goroutine 1
This commit is contained in:
@@ -31,7 +31,7 @@ func Run() {
|
||||
alloc := NewAlloc()
|
||||
exporter := NewExporter(conf, alloc, metrics)
|
||||
|
||||
exporter.RunIOchecks()
|
||||
wg := exporter.RunIOchecks()
|
||||
|
||||
http.Handle("/metrics", promhttp.HandlerFor(
|
||||
metrics.registry,
|
||||
@@ -49,6 +49,8 @@ func Run() {
|
||||
if err := http.ListenAndServe(fmt.Sprintf(":%d", conf.Port), nil); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func report(err error, fd *os.File) bool {
|
||||
|
||||
Reference in New Issue
Block a user