diff options
author | Martin Lucina <mato@kotelna.sk> | 2011-10-03 17:09:06 +0200 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-01-23 08:54:33 +0100 |
commit | c3363afa881b46f3df8a6b72ed15cfbac18f4713 (patch) | |
tree | 832e8075a038b49f81e8a7635344f1647007fd15 /src/req.cpp | |
parent | 88f712b4a31c95caef4f34c4ec65793c392314a6 (diff) | |
parent | 978e33ba253a997b41b331b449b474a5cee7bccc (diff) |
Imported Debian patch 2.1.10-1debian/2.1.10-1
Diffstat (limited to 'src/req.cpp')
-rw-r--r-- | src/req.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/req.cpp b/src/req.cpp index 503f221..6a6b6a8 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -84,8 +84,12 @@ int zmq::req_t::xrecv (zmq_msg_t *msg_, int flags_) int rc = xreq_t::xrecv (msg_, flags_); if (rc != 0) return rc; - zmq_assert (msg_->flags & ZMQ_MSG_MORE); - zmq_assert (zmq_msg_size (msg_) == 0); + + // TODO: this should also close the connection with the peer + if (!(msg_->flags & ZMQ_MSG_MORE) || zmq_msg_size (msg_) != 0) { + errno = EAGAIN; + return -1; + } message_begins = false; } |