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