update debug

This commit is contained in:
shoopea 2020-02-05 13:02:32 +08:00
parent 0a692e6537
commit 7c94be55b9

View File

@ -251,7 +251,7 @@ func MQTGCmdWorker(id int, cmds <-chan TGCommand) {
if clt, ok := getLockedClient(c.FromUserID64, false); ok {
j, err := json.Marshal(c)
logOnError(err, "MQTGCmdWorker["+strconv.Itoa(id)+"] : Marshal(c)")
log.Printf("MQTGCmdWorker["+strconv.Itoa(id)+"] : new command.\n%s\n", string(j))
//log.Printf("MQTGCmdWorker["+strconv.Itoa(id)+"] : new command.\n%s\n", string(j))
for clt.MQ.Connection == nil || clt.MQ.Connection.IsClosed() {
clt.Active = false
log.Printf("MQTGCmdWorker : Resetting MQ connection for #%d.\n", c.FromUserID64)
@ -299,7 +299,7 @@ func MQTGCmdWorker(id int, cmds <-chan TGCommand) {
Body: []byte(j),
})
logOnError(err, "MQTGCmdWorker["+strconv.Itoa(id)+"] : Publishing message.")
log.Printf("MQTGCmdWorker[" + strconv.Itoa(id) + "] : Message published.")
//log.Printf("MQTGCmdWorker[" + strconv.Itoa(id) + "] : Message published.")
clt.Mux.Unlock()
} else {
log.Printf("MQTGCmdWorker["+strconv.Itoa(id)+"] : client %d offline.\n", c.FromUserID64)