test
This commit is contained in:
parent
75efdb2e34
commit
4a16193666
@ -287,18 +287,18 @@ func MQTidyKeepAliveWorker() {
|
||||
log.Printf("MQTidyKeepAliveWorker : Starting.")
|
||||
for true {
|
||||
t := time.Now()
|
||||
for k, v := range clientsQueues {
|
||||
for _, v := range clientsQueues {
|
||||
if v.Date.Add(90 * time.Second).Before(time.Now()) {
|
||||
c := TGCommand{
|
||||
Type: commandSendMsg,
|
||||
ToChatID64: x.UserID64,
|
||||
ToChatID64: v.UserID64,
|
||||
Text: "Timeout.",
|
||||
}
|
||||
TGCmdQueue <- c
|
||||
delete(clientsQueues, x.UserID64)
|
||||
delete(clientsQueues, v.UserID64)
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Until(t.Add(time.Minute)))
|
||||
time.Sleep(time.Until(t.Add(time.Second)))
|
||||
}
|
||||
log.Printf("MQTidyKeepAliveWorker : Closing.")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user