From 58c1ba89940ba3eeb7124a4ced8cf3bb962f2e15 Mon Sep 17 00:00:00 2001 From: John Muehlhausen Date: Sat, 27 Oct 2012 15:51:03 -0500 Subject: [PATCH] patch for issue 456 Do not filter out duplicate subscriptions on the XSUB side of XSUB/XPUB, so that ZMQ_XPUB_VERBOSE doesn't get blocked by forwarding devices (as long as the devices all use ZMQ_XPUB_VERBOSE) --- src/xsub.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/xsub.cpp b/src/xsub.cpp index d41e31b1..96bcc0ca 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -95,7 +95,13 @@ int zmq::xsub_t::xsend (msg_t *msg_, int flags_) // Process the subscription. if (*data == 1) { - if (subscriptions.add (data + 1, size - 1)) + // this used to filter out duplicate subscriptions, + // however this is alread done on the XPUB side and + // doing it here as well breaks ZMQ_XPUB_VERBOSE + // when there are forwarding devices involved + // + //if (subscriptions.add (data + 1, size - 1)) + subscriptions.add (data + 1, size - 1); return dist.send_to_all (msg_, flags_); } else {