This commit is contained in:
shoopea 2019-06-28 15:27:18 +08:00
parent 48ff558d59
commit 51102e96d3

View File

@ -14,7 +14,6 @@ import (
func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
//log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
var x ChatWarsMessage
s := MQSession{
User: cfg.Rabbit.User,
Password: cfg.Rabbit.Password,
@ -55,6 +54,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
false, // no-wait
nil, // args
)
var x ChatWarsMessage
for d := range m {
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body))
err = json.Unmarshal(d.Body, &x)