Commit f858321c authored by Sergey KHripchenko's avatar Sergey KHripchenko

add process_commands() to the beginning of zmq_connect() and zmq_bind()

I believe there was a conception that zmq_connect() and zmq_bind() will be called
only at the socket creation time and therefore don't need it.
Now it is not true anymore.
parent 057fab09
......@@ -305,10 +305,15 @@ int zmq::socket_base_t::bind (const char *addr_)
return -1;
}
// Process pending commands, if any.
int rc = process_commands (0, false);
if (unlikely (rc != 0))
return -1;
// Parse addr_ string.
std::string protocol;
std::string address;
int rc = parse_uri (addr_, protocol, address);
rc = parse_uri (addr_, protocol, address);
if (rc != 0)
return -1;
......@@ -387,10 +392,15 @@ int zmq::socket_base_t::connect (const char *addr_)
return -1;
}
// Process pending commands, if any.
int rc = process_commands (0, false);
if (unlikely (rc != 0))
return -1;
// Parse addr_ string.
std::string protocol;
std::string address;
int rc = parse_uri (addr_, protocol, address);
rc = parse_uri (addr_, protocol, address);
if (rc != 0)
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment