1
mirror of https://github.com/monero-project/monero synced 2024-11-17 09:53:22 +01:00

zmq_server: fix bind call when address and/or port are empty

This commit is contained in:
moneromooo-monero 2018-06-17 13:48:12 +01:00
parent 280e1a64bd
commit 223429f0fd
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -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());
}