From 978e33ba253a997b41b331b449b474a5cee7bccc Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:54:31 +0100 Subject: Imported Upstream version 2.1.10 --- src/req.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/req.cpp') 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; } -- cgit v1.2.3