This commit is contained in:
shoopea 2019-07-31 15:06:16 +08:00
parent aad937f0d6
commit d5ff9a9c4e

View File

@ -166,10 +166,10 @@ func MQKeepAliveWorker() {
} else if clt, ok := getLockedClient(x.TGUserID64, true); ok {
clt.HeartBeat = x.Date
if clt.Active {
log.Printf("MQKeepAliveWorker : Client already active.\n")
log.Printf("MQKeepAliveWorker : Client %s already active.\n", x.Nickname)
clt.Mux.Unlock()
} else {
log.Printf("MQKeepAliveWorker : Connecting client.\n")
log.Printf("MQKeepAliveWorker : Connecting to %s.\n", x.Nickname)
clt.MQ = MQClient{
User: cfg.Rabbit.User,
Password: cfg.Rabbit.Password,
@ -202,6 +202,7 @@ func MQKeepAliveWorker() {
clt.MQ.Connection.Close()
} else {
clt.Active = true
log.Printf("MQKeepAliveWorker : Connected to %s.\n", x.Nickname)
}
}
}