Add option to control heartbeat frequency

This commit is contained in:
raul 2024-06-10 09:31:02 +02:00
parent 9029226adc
commit 908218ebac
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,8 @@ var (
clientList []Client clientList []Client
clientIDs int = 0 clientIDs int = 0
heartbeatRate time.Duration = 15
isUsingJSONParameter bool isUsingJSONParameter bool
clientJSONPath string = "/.config/tiamat/clients.json" clientJSONPath string = "/.config/tiamat/clients.json"
) )
@ -139,7 +141,7 @@ func Heartbeat(ID int) {
return return
} }
time.Sleep(time.Second * 10) time.Sleep(time.Second * heartbeatRate)
} }
} }