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.
This commit is contained in:
Martin Hurton 2015-02-19 21:38:10 +01:00 committed by Pieter Hintjens
parent 77ef79e3b5
commit d8d9d17b21

View File

@ -242,6 +242,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);
}