Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3350002
D4743.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
D4743.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
@@ -35,12 +35,10 @@
config::ConfigManager::getInstance().getParameter(
config::ConfigManager::OPTION_AMQP_FANOUT_EXCHANGE);
LOG(INFO) << "AMQP: Connecting to " << amqpUri;
-
- auto *loop = uv_default_loop();
- AMQP::LibUvHandler handler(loop);
- AMQP::TcpConnection connection(&handler, AMQP::Address(amqpUri));
-
- this->amqpChannel = std::make_unique<AMQP::TcpChannel>(&connection);
+ uv_loop_t *localUvLoop = uv_default_loop();
+ AMQP::LibUvHandler uvHandler(localUvLoop);
+ AMQP::TcpConnection tcpConnection(&uvHandler, AMQP::Address(amqpUri));
+ this->amqpChannel = std::make_unique<AMQP::TcpChannel>(&tcpConnection);
this->amqpChannel->onReady([this]() {
LOG(INFO) << "AMQP: Channel is ready";
this->amqpReady = true;
@@ -92,7 +90,7 @@
throw std::runtime_error(
"AMQP: Queue creation error: " + std::string(message));
});
- uv_run(loop, UV_RUN_DEFAULT);
+ uv_run(localUvLoop, UV_RUN_DEFAULT);
};
void AmqpManager::connect() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 8:13 PM (20 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572312
Default Alt Text
D4743.diff (1 KB)
Attached To
Mode
D4743: [services] Tunnelbroker - Refactor handler names in Amqp `connectInternal()`
Attached
Detach File
Event Timeline
Log In to Comment