zmq: Add support to listen on multiple interfaces

This commit is contained in:
Nicolas Thumann 2020-03-10 16:29:45 +01:00 committed by nthumann
parent 1b313cacc9
commit 347c94f551
No known key found for this signature in database
GPG Key ID: 91AE26F52DE54B76

View File

@ -42,10 +42,8 @@ CZMQNotificationInterface* CZMQNotificationInterface::Create()
for (const auto& entry : factories)
{
std::string arg("-zmq" + entry.first);
if (gArgs.IsArgSet(arg))
{
const auto& factory = entry.second;
const std::string address = gArgs.GetArg(arg, "");
const auto& factory = entry.second;
for (const std::string& address : gArgs.GetArgs(arg)) {
std::unique_ptr<CZMQAbstractNotifier> notifier = factory();
notifier->SetType(entry.first);
notifier->SetAddress(address);