Page MenuHomePhabricator

D4743.diff
No OneTemporary

D4743.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
@@ -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

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)

Event Timeline