From b1a33e277b92652cd174c9fb4567d046ee4d9e50 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 15 May 2019 10:35:51 +0800 Subject: [PATCH] direction channel --- mq.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mq.go b/mq.go index 3043636..9b9222b 100644 --- a/mq.go +++ b/mq.go @@ -51,7 +51,7 @@ func MQSendMsgWorker(id int, msgs <-chan ChatWarsMessage) { } -func MQReceiveMsgWorker(id int, cmd <-chan ChatWarsCommand) { +func MQReceiveMsgWorker(id int, cmd chan<- ChatWarsCommand) { conn, err := amqp.Dial("amqp://" + cfg.Rabbit.User + ":" + cfg.Rabbit.Password + "@" + cfg.Rabbit.Host + "/" + cfg.Rabbit.ReceiveQueue) failOnError(err, "MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ") defer conn.Close()