Fixed loop

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-06-21 08:29:00 +01:00
parent 2ffa757a67
commit de9d98c040
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -26,8 +26,10 @@ func main() {
flag.IntVar(&port, "port", 9091, "The port to listen on") flag.IntVar(&port, "port", 9091, "The port to listen on")
go (func() { go (func() {
checkSpeed() for {
time.Sleep(time.Minute * time.Duration(interval)) checkSpeed()
time.Sleep(time.Minute * time.Duration(interval))
}
})() })()
collector := newSpeedCollector() collector := newSpeedCollector()