parent
7f3202f35f
commit
7a7e564029
2
mq.go
2
mq.go
@ -4,7 +4,7 @@ import (
|
|||||||
"github.com/streadway/amqp"
|
"github.com/streadway/amqp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Open(c *MQClient) error {
|
func (c *MQClient) Open() error {
|
||||||
var err error
|
var err error
|
||||||
c.Connection, err = amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
c.Connection, err = amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
SSL: false,
|
SSL: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
err := Open(c)
|
err := c.Open()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
q, err := c.Channel.QueueDeclare(
|
q, err := c.Channel.QueueDeclare(
|
||||||
|
Loading…
Reference in New Issue
Block a user