mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-07 09:48:07 +01:00
Merge pull request #321 from shripchenko/master
add process_commands() to the beginning of zmq_connect() and zmq_bind()
This commit is contained in:
commit
c120f02dc9
@ -304,10 +304,15 @@ int zmq::socket_base_t::bind (const char *addr_)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process pending commands, if any.
|
||||||
|
int rc = process_commands (0, false);
|
||||||
|
if (unlikely (rc != 0))
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Parse addr_ string.
|
// Parse addr_ string.
|
||||||
std::string protocol;
|
std::string protocol;
|
||||||
std::string address;
|
std::string address;
|
||||||
int rc = parse_uri (addr_, protocol, address);
|
rc = parse_uri (addr_, protocol, address);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -386,10 +391,15 @@ int zmq::socket_base_t::connect (const char *addr_)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process pending commands, if any.
|
||||||
|
int rc = process_commands (0, false);
|
||||||
|
if (unlikely (rc != 0))
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Parse addr_ string.
|
// Parse addr_ string.
|
||||||
std::string protocol;
|
std::string protocol;
|
||||||
std::string address;
|
std::string address;
|
||||||
int rc = parse_uri (addr_, protocol, address);
|
rc = parse_uri (addr_, protocol, address);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user