From cf499ee016340a8534e24084a481a02498b44e70 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Wed, 14 Sep 2011 14:31:09 +0200 Subject: Bug in message distribution algorithm fixed (issue 251) Signed-off-by: Martin Sustrik --- src/dist.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/dist.cpp') diff --git a/src/dist.cpp b/src/dist.cpp index 23e790d..79baf43 100644 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -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 -- cgit v1.2.3