prevent duplicate connections from PUB sockets also (see https://github.com/zeromq/libzmq/issues/788)

This commit is contained in:
Bill Torpey 2017-12-29 14:36:59 -05:00
parent 4621e5885e
commit ec05166545

View File

@ -823,7 +823,7 @@ int zmq::socket_base_t::connect (const char *addr_)
return 0;
}
bool is_single_connect = (options.type == ZMQ_DEALER ||
options.type == ZMQ_SUB ||
options.type == ZMQ_SUB || options.type == ZMQ_PUB ||
options.type == ZMQ_REQ);
if (unlikely (is_single_connect)) {
const endpoints_t::iterator it = endpoints.find (addr_);