diff options
author | Martin Lucina <martin@lucina.net> | 2012-01-23 08:54:31 +0100 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-01-23 08:54:31 +0100 |
commit | 978e33ba253a997b41b331b449b474a5cee7bccc (patch) | |
tree | 68b0709e1ebb04bf7fd102a7783e3f93dd52cc8c /src/req.cpp | |
parent | 75af6aed482ab16997c1388fe801f74d11ec12a4 (diff) |
Imported Upstream version 2.1.10upstream/2.1.10
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; } |