summaryrefslogtreecommitdiff
path: root/controller/RabbitMQ.cpp
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2019-03-08 10:20:19 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2019-03-08 10:20:19 -0800
commit171cc3e01add8d25d221f4a29d6961b8a1a9d32e (patch)
tree140eeb6e99cd7e93f1bf377cc6b71d8e02817bf0 /controller/RabbitMQ.cpp
parent814104356085198fb6aa09f6f5e6f39406d2fc06 (diff)
downloadinfinitytier-171cc3e01add8d25d221f4a29d6961b8a1a9d32e.tar.gz
infinitytier-171cc3e01add8d25d221f4a29d6961b8a1a9d32e.zip
reorder a couple of things
Diffstat (limited to 'controller/RabbitMQ.cpp')
-rw-r--r--controller/RabbitMQ.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/controller/RabbitMQ.cpp b/controller/RabbitMQ.cpp
index e6b8c819..096d3f53 100644
--- a/controller/RabbitMQ.cpp
+++ b/controller/RabbitMQ.cpp
@@ -48,13 +48,13 @@ void RabbitMQ::init()
}
static int chan = 0;
- amqp_channel_open(_conn, ++chan);
+ _channel = ++chan;
+ amqp_channel_open(_conn, _channel);
r = amqp_get_rpc_reply(_conn);
if(r.reply_type != AMQP_RESPONSE_NORMAL) {
throw std::runtime_error("Error opening communication channel");
}
- _channel = chan;
-
+
_q = amqp_queue_declare(_conn, _channel, amqp_cstring_bytes(_qName), 0, 0, 0, 0, amqp_empty_table);
r = amqp_get_rpc_reply(_conn);
if (r.reply_type != AMQP_RESPONSE_NORMAL) {