Commit 5a776f55 authored by Martin Sustrik's avatar Martin Sustrik

PGM late joiners would start receiving a complete message rather than a message part

parent 0f891e09
...@@ -98,13 +98,15 @@ bool zmq::zmq_encoder_t::message_ready () ...@@ -98,13 +98,15 @@ bool zmq::zmq_encoder_t::message_ready ()
if (size < 255) { if (size < 255) {
tmpbuf [0] = (unsigned char) size; tmpbuf [0] = (unsigned char) size;
tmpbuf [1] = (in_progress.flags & ~ZMQ_MSG_SHARED); tmpbuf [1] = (in_progress.flags & ~ZMQ_MSG_SHARED);
next_step (tmpbuf, 2, &zmq_encoder_t::size_ready, true); next_step (tmpbuf, 2, &zmq_encoder_t::size_ready,
!(in_progress.flags & ZMQ_MSG_TBC));
} }
else { else {
tmpbuf [0] = 0xff; tmpbuf [0] = 0xff;
put_uint64 (tmpbuf + 1, size); put_uint64 (tmpbuf + 1, size);
tmpbuf [9] = (in_progress.flags & ~ZMQ_MSG_SHARED); tmpbuf [9] = (in_progress.flags & ~ZMQ_MSG_SHARED);
next_step (tmpbuf, 10, &zmq_encoder_t::size_ready, true); next_step (tmpbuf, 10, &zmq_encoder_t::size_ready,
!(in_progress.flags & ZMQ_MSG_TBC));
} }
return true; return true;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment