mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-21 06:59:38 +08:00
Merge pull request #2327 from chutz/fix-divide-by-zero
fix divide by zero in zmq::lb_t::sendpipe
This commit is contained in:
commit
e56bc48ebc
@ -137,7 +137,9 @@ int zmq::lb_t::sendpipe (msg_t *msg_, pipe_t **pipe_)
|
|||||||
more = msg_->flags () & msg_t::more? true: false;
|
more = msg_->flags () & msg_t::more? true: false;
|
||||||
if (!more) {
|
if (!more) {
|
||||||
pipes [current]->flush ();
|
pipes [current]->flush ();
|
||||||
current = (current + 1) % active;
|
|
||||||
|
if (++current >= active)
|
||||||
|
current = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detach the message from the data buffer.
|
// Detach the message from the data buffer.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user