summaryrefslogtreecommitdiff
path: root/src/xrep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xrep.cpp')
-rw-r--r--src/xrep.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xrep.cpp b/src/xrep.cpp
index 96f991a..d45b8aa 100644
--- a/src/xrep.cpp
+++ b/src/xrep.cpp
@@ -101,6 +101,13 @@ void zmq::xrep_t::terminated (reader_t *pipe_)
for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end ();
it++) {
if (it->reader == pipe_) {
+ if (inpipes [current_in].reader == pipe_) {
+
+ // A reader is not allowed to terminate in the middle of a
+ // multipart message.
+ zmq_assert (!prefetched);
+ zmq_assert (!more_in);
+ }
inpipes.erase (it);
if (terminating)
unregister_term_ack ();