Execute first and sleep, not the other way
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2019-05-07 13:37:49 +02:00
parent cf671ff332
commit 707235115c
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,6 @@ import (
// UpdateActiveClients counts all clients and sends the number to the server. Meant to run inside a goroutine.
func UpdateActiveClients() {
for {
time.Sleep(config.UpdateSecondsInterval * time.Second)
clients := ParseCSVDumps(viper.GetString("daemon.csvlocation"))
var activeClients int64
@ -40,5 +38,7 @@ func UpdateActiveClients() {
ActiveClients <- activeClients
//fmt.Println("Active Clients:", activeClients)
//fmt.Println("Total Clients:", len(clients))
time.Sleep(config.UpdateSecondsInterval * time.Second)
}
}