Skip to content

Commit

Permalink
zmq_server: fix bind call when address and/or port are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
moneromooo-monero committed Jul 4, 2018
1 parent 280e1a6 commit 223429f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rpc/zmq_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 223429f

Please sign in to comment.