From 5ed6ac60e258a6e67a2fdc3a75ddfdcc4db16596 Mon Sep 17 00:00:00 2001 From: Martin Hurton Date: Thu, 19 Feb 2015 21:38:10 +0100 Subject: [PATCH] Adjust number of sent messages on hiccups Not adjusting the sent message count may lead to situation when SUB socket does not forward its subscriptions. --- src/pipe.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); }