Commit e56bc48e authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #2327 from chutz/fix-divide-by-zero

fix divide by zero in zmq::lb_t::sendpipe
parents 5c34f65a df7c684d
......@@ -137,7 +137,9 @@ int zmq::lb_t::sendpipe (msg_t *msg_, pipe_t **pipe_)
more = msg_->flags () & msg_t::more? true: false;
if (!more) {
pipes [current]->flush ();
current = (current + 1) % active;
if (++current >= active)
current = 0;
}
// Detach the message from the data buffer.
......
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