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:
commit
cea60575f3
@ -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_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user