Commit cf499ee0 authored by Martin Sustrik's avatar Martin Sustrik

Bug in message distribution algorithm fixed (issue 251)

Signed-off-by: 's avatarMartin Sustrik <sustrik@250bpm.com>
parent 42737f09
......@@ -142,11 +142,9 @@ void zmq::dist_t::distribute (msg_t *msg_, int flags_)
msg_->add_refs ((int) matching - 1);
// Push copy of the message to each matching pipe.
for (pipes_t::size_type i = 0; i < matching;) {
for (pipes_t::size_type i = 0; i < matching; ++i) {
if (!write (pipes [i], msg_))
msg_->rm_refs (1);
else
i++;
}
// Detach the original message from the data buffer. Note that we don't
......
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