Page MenuHomePhabricator

D4742.diff
No OneTemporary

D4742.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
@@ -41,6 +41,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";
@@ -62,9 +66,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, 8:09 PM (20 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572305
Default Alt Text
D4742.diff (1 KB)

Event Timeline