Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3349992
D4742.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4742.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4742: [services] Tunnelbroker - Fix `amqpReady` assignment
Attached
Detach File
Event Timeline
Log In to Comment