aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/zmq_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-17 13:48:12 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-17 21:25:11 +0100
commit5b5828fcec3e4fe9c437e7e524c1d38bdbe454cb (patch)
tree7620758e3d3b3b195662715d4e536cff2fc29c30 /src/rpc/zmq_server.cpp
parentMerge pull request #3804 (diff)
downloadmonero-5b5828fcec3e4fe9c437e7e524c1d38bdbe454cb.tar.xz
zmq_server: fix bind call when address and/or port are empty
Diffstat (limited to '')
-rw-r--r--src/rpc/zmq_server.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/zmq_server.cpp b/src/rpc/zmq_server.cpp
index 3aee8c4c7..edd3e6669 100644
--- a/src/rpc/zmq_server.cpp
+++ b/src/rpc/zmq_server.cpp
@@ -104,6 +104,10 @@ bool ZmqServer::addTCPSocket(std::string address, std::string port)
rep_socket->setsockopt(ZMQ_RCVTIMEO, &DEFAULT_RPC_RECV_TIMEOUT_MS, sizeof(DEFAULT_RPC_RECV_TIMEOUT_MS));
+ if (address.empty())
+ address = "*";
+ if (port.empty())
+ port = "*";
std::string bind_address = addr_prefix + address + std::string(":") + port;
rep_socket->bind(bind_address.c_str());
}