diff options
author | malosek <malosek@fastmq.com> | 2009-09-16 10:11:01 +0200 |
---|---|---|
committer | malosek <malosek@fastmq.com> | 2009-09-16 10:11:01 +0200 |
commit | 969522bbf55467b6f6e8113be28451d087060843 (patch) | |
tree | 6a78392b4f76bca99b54c1eb7d44550b4dee34c5 /src/sub.cpp | |
parent | 0381a78c0484012e760d61051f325c71136df17e (diff) |
added OpenPGM receiver - ZMQ_SUB
Diffstat (limited to 'src/sub.cpp')
-rw-r--r-- | src/sub.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sub.cpp b/src/sub.cpp index 51e0c23..101c62f 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -101,6 +101,12 @@ int zmq::sub_t::recv (struct zmq_msg_t *msg_, int flags_) if (rc != 0 && errno == EAGAIN) return -1; + // If there is no subscription return -1/EAGAIN. + if (!all_count && prefixes.empty () && topics.empty ()) { + errno = EAGAIN; + return -1; + } + // If there is at least one "*" subscription, the message matches. if (all_count) return 0; |