diff --git a/src/pipe.cpp b/src/pipe.cpp index 13e00c9f..a58a6f2d 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -267,6 +267,8 @@ void zmq::pipe_t::process_hiccup (void *pipe_) outpipe->flush (); msg_t msg; while (outpipe->read (&msg)) { + if (!(msg.flags () & msg_t::more)) + msgs_written--; int rc = msg.close (); errno_assert (rc == 0); }