Skip to content

Commit

Permalink
PGM late joiners would start receiving a complete message rather than…
Browse files Browse the repository at this point in the history
… a message part
  • Loading branch information
sustrik committed Mar 9, 2010
1 parent 0f891e0 commit 5a776f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/zmq_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,15 @@ bool zmq::zmq_encoder_t::message_ready ()
if (size < 255) {
tmpbuf [0] = (unsigned char) size;
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 {
tmpbuf [0] = 0xff;
put_uint64 (tmpbuf + 1, size);
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;
}

0 comments on commit 5a776f5

Please sign in to comment.