From 7f77cad0565e1242a54b923a439588e04fba340f Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Tue, 25 Jan 2022 17:49:15 +0100 Subject: [PATCH] Don't wait too long in case of --once --- metric-collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metric-collector.go b/metric-collector.go index b3ad9d0..25989ed 100644 --- a/metric-collector.go +++ b/metric-collector.go @@ -286,7 +286,7 @@ func mainFunc() int { // Wait until one tick has passed. This is a workaround if rcfg.CliArgs["once"] == "true" { - x := 1.8 * float64(rcfg.ConfigFile.Interval) + x := 1.2 * float64(rcfg.ConfigFile.Interval) time.Sleep(time.Duration(int(x)) * time.Second) shutdown(&rcfg) }