0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 01:37:56 +08:00

Merge pull request #2879 from WallStProg/dup-connect

prevent duplicate connections from PUB sockets also
This commit is contained in:
Luca Boccassi 2017-12-29 23:03:39 +01:00 committed by GitHub
commit cea60575f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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_);