test
This commit is contained in:
parent
64f9f08666
commit
3731e36e5f
@ -26,13 +26,14 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
||||
}
|
||||
|
||||
conn, err := amqp.Dial("amqp://" + c.User + ":" + c.Password + "@" + c.Host + "/" + c.Path)
|
||||
c.Connection = conn
|
||||
|
||||
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Failed to connect to RabbitMQ")
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
c.Connection.Close()
|
||||
time.Sleep(15 * time.Second)
|
||||
} else {
|
||||
ch, err := conn.Channel()
|
||||
ch, err := c.Connection.Channel()
|
||||
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Failed to open a channel")
|
||||
if err != nil {
|
||||
ch.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user