This commit is contained in:
shoopea 2019-07-31 15:04:13 +08:00
parent bc0135f220
commit aad937f0d6

View File

@ -156,11 +156,11 @@ func MQKeepAliveWorker() {
}
for d := range m {
log.Printf("MQKeepAliveWorker : Received a message: %s", string(d.Body))
x := MQKeepAlive{}
err = json.Unmarshal(d.Body, &x)
logOnError(err, "MQKeepAliveWorker : Can't unmarshal.\n"+string(d.Body))
if err == nil {
log.Printf("MQKeepAliveWorker : Received message from %s", x.Nickname)
if x.Date.Add(10 * time.Second).Before(time.Now()) {
// outdated keep-alive coming from client
} else if clt, ok := getLockedClient(x.TGUserID64, true); ok {