summaryrefslogtreecommitdiff
path: root/src/xsub.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsub.cpp')
-rw-r--r--src/xsub.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xsub.cpp b/src/xsub.cpp
index a847d7f..60ba598 100644
--- a/src/xsub.cpp
+++ b/src/xsub.cpp
@@ -133,7 +133,7 @@ int zmq::xsub_t::xrecv (msg_t *msg_, int flags_)
// Check whether the message matches at least one subscription.
// Non-initial parts of the message are passed
- if (more || match (msg_)) {
+ if (more || !options.filter || match (msg_)) {
more = msg_->flags () & msg_t::more;
return 0;
}
@@ -173,7 +173,7 @@ bool zmq::xsub_t::xhas_in ()
}
// Check whether the message matches at least one subscription.
- if (match (&message)) {
+ if (!options.filter || match (&message)) {
has_message = true;
return true;
}