diff --git a/pkg/processing/update_active_clients.go b/pkg/processing/update_active_clients.go index 293dada..59ae581 100644 --- a/pkg/processing/update_active_clients.go +++ b/pkg/processing/update_active_clients.go @@ -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) } }