fix
This commit is contained in:
parent
9f7e236ecd
commit
76eb120b27
4
mq.go
4
mq.go
@ -40,10 +40,10 @@ func MQGetMsg(id int, msgs chan<- ChatWarsMessage) {
|
||||
failOnError(err, "MQGetMsg["+strconv.Itoa(id)+"] : Failed to register a consumer")
|
||||
|
||||
for d := range m {
|
||||
log.Printf("MQGetMsg["+strconv.Itoa(id)+"] : Received a message: %s", d.Body)
|
||||
log.Printf("MQGetMsg["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body))
|
||||
|
||||
if err = json.Unmarshal(d.Body, &x); err != nil {
|
||||
logOnError(err, "MQGetMsg["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+d.Body)
|
||||
logOnError(err, "MQGetMsg["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body))
|
||||
} else {
|
||||
msgs <- x
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user