Commit c120f02d authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #321 from shripchenko/master

add process_commands() to the beginning of zmq_connect() and zmq_bind()
parents b9fb9198 f858321c
......@@ -304,10 +304,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;
......@@ -386,10 +391,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