zmq: Add support to listen on multiple interfaces

This commit is contained in:
Nicolas Thumann authored and nthumann committed 2020-09-23 23:14:28 +02:00
1 parent 1b313cacc9
commit 347c94f551
1 file changed
+2 -4
+2 -4
View File
@@ -42,10 +42,8 @@ CZMQNotificationInterface* CZMQNotificationInterface::Create()
for (const auto& entry : factories) for (const auto& entry : factories)
{ {
std::string arg("-zmq" + entry.first); std::string arg("-zmq" + entry.first);
if (gArgs.IsArgSet(arg)) const auto& factory = entry.second;
{ for (const std::string& address : gArgs.GetArgs(arg)) {
const auto& factory = entry.second;
const std::string address = gArgs.GetArg(arg, "");
std::unique_ptr<CZMQAbstractNotifier> notifier = factory(); std::unique_ptr<CZMQAbstractNotifier> notifier = factory();
notifier->SetType(entry.first); notifier->SetType(entry.first);
notifier->SetAddress(address); notifier->SetAddress(address);