Page MenuHomePhabricator

D4742.id15327.diff
No OneTemporary

D4742.id15327.diff

diff --git a/services/tunnelbroker/src/Amqp/AmqpManager.cpp b/services/tunnelbroker/src/Amqp/AmqpManager.cpp
--- a/services/tunnelbroker/src/Amqp/AmqpManager.cpp
+++ b/services/tunnelbroker/src/Amqp/AmqpManager.cpp
@@ -45,6 +45,10 @@
AMQP::TcpConnection connection(&handler, AMQP::Address(amqpUri));
this->amqpChannel = std::make_unique<AMQP::TcpChannel>(&connection);
+ this->amqpChannel->onReady([this]() {
+ LOG(INFO) << "AMQP: Channel is ready";
+ this->amqpReady = true;
+ });
this->amqpChannel->onError([this](const char *message) {
LOG(ERROR) << "AMQP: channel error: " << message
<< ", will try to reconnect";
@@ -66,9 +70,7 @@
const char *message) {
LOG(ERROR) << "AMQP: Failed to bind queue: " << tunnelbrokerID
<< " to exchange: " << fanoutExchangeName;
- this->amqpReady = false;
});
- this->amqpReady = true;
this->amqpChannel->consume(tunnelbrokerID)
.onReceived([](const AMQP::Message &message,
uint64_t deliveryTag,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 11:38 PM (17 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572824
Default Alt Text
D4742.id15327.diff (1 KB)

Event Timeline